Issue #83 - Project limit

This commit is contained in:
Valera Sizov 2011-10-09 11:15:01 -07:00
parent 9840102651
commit 67f0c62d07
13 changed files with 45 additions and 9 deletions

View file

@ -6,5 +6,6 @@ admin = User.create(
:password_confirmation => "5iveL!fe"
)
admin.projects_limit = 10000
admin.admin = true
admin.save!

View file

@ -5,5 +5,6 @@ admin = User.create(
:password_confirmation => "5iveL!fe"
)
admin.projects_limit = 10000
admin.admin = true
admin.save!

View file

@ -0,0 +1,5 @@
class AddProjectsLimitToUser < ActiveRecord::Migration
def change
add_column :users, :projects_limit, :integer, :default => 10
end
end

View file

@ -0,0 +1,9 @@
class RemoveAllowCreateRepoFromUser < ActiveRecord::Migration
def up
remove_column :users, :allowed_create_repo
end
def down
add_column :users, :allowed_create_repo, :boolean, :default => true, :null => false
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20111009101738) do
ActiveRecord::Schema.define(:version => 20111009111204) do
create_table "issues", :force => true do |t|
t.string "title"
@ -70,7 +70,7 @@ ActiveRecord::Schema.define(:version => 20111009101738) do
t.datetime "updated_at"
t.string "name"
t.boolean "admin", :default => false, :null => false
t.boolean "allowed_create_repo", :default => true, :null => false
t.integer "projects_limit"
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true