Issue #83 - Project limit
This commit is contained in:
parent
9840102651
commit
67f0c62d07
13 changed files with 45 additions and 9 deletions
|
@ -6,5 +6,6 @@ admin = User.create(
|
|||
:password_confirmation => "5iveL!fe"
|
||||
)
|
||||
|
||||
admin.projects_limit = 10000
|
||||
admin.admin = true
|
||||
admin.save!
|
||||
|
|
|
@ -5,5 +5,6 @@ admin = User.create(
|
|||
:password_confirmation => "5iveL!fe"
|
||||
)
|
||||
|
||||
admin.projects_limit = 10000
|
||||
admin.admin = true
|
||||
admin.save!
|
||||
|
|
5
db/migrate/20111009110913_add_projects_limit_to_user.rb
Normal file
5
db/migrate/20111009110913_add_projects_limit_to_user.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddProjectsLimitToUser < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :projects_limit, :integer, :default => 10
|
||||
end
|
||||
end
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue