Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorValera Sizov <vsv2711@gmail.com>2011-10-09 22:15:01 +0400
committerValera Sizov <vsv2711@gmail.com>2011-10-09 22:15:01 +0400
commit67f0c62d0737ceeeb1babc953fbab41438e8d4f2 (patch)
treefe1cb1e267375e0c24029bd3f22cc82447f11464 /db
parent9840102651ac84d2eb7824113a544bf4992e0398 (diff)
Issue #83 - Project limit
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/001_admin.rb1
-rw-r--r--db/fixtures/production/001_admin.rb1
-rw-r--r--db/migrate/20111009110913_add_projects_limit_to_user.rb5
-rw-r--r--db/migrate/20111009111204_remove_allow_create_repo_from_user.rb9
-rw-r--r--db/schema.rb4
5 files changed, 18 insertions, 2 deletions
diff --git a/db/fixtures/development/001_admin.rb b/db/fixtures/development/001_admin.rb
index 5020eccbca4..9c5a6da09e0 100644
--- a/db/fixtures/development/001_admin.rb
+++ b/db/fixtures/development/001_admin.rb
@@ -6,5 +6,6 @@ admin = User.create(
:password_confirmation => "5iveL!fe"
)
+admin.projects_limit = 10000
admin.admin = true
admin.save!
diff --git a/db/fixtures/production/001_admin.rb b/db/fixtures/production/001_admin.rb
index a50a693632b..94d1abe87ce 100644
--- a/db/fixtures/production/001_admin.rb
+++ b/db/fixtures/production/001_admin.rb
@@ -5,5 +5,6 @@ admin = User.create(
:password_confirmation => "5iveL!fe"
)
+admin.projects_limit = 10000
admin.admin = true
admin.save!
diff --git a/db/migrate/20111009110913_add_projects_limit_to_user.rb b/db/migrate/20111009110913_add_projects_limit_to_user.rb
new file mode 100644
index 00000000000..8eb8382b515
--- /dev/null
+++ b/db/migrate/20111009110913_add_projects_limit_to_user.rb
@@ -0,0 +1,5 @@
+class AddProjectsLimitToUser < ActiveRecord::Migration
+ def change
+ add_column :users, :projects_limit, :integer, :default => 10
+ end
+end
diff --git a/db/migrate/20111009111204_remove_allow_create_repo_from_user.rb b/db/migrate/20111009111204_remove_allow_create_repo_from_user.rb
new file mode 100644
index 00000000000..61452006397
--- /dev/null
+++ b/db/migrate/20111009111204_remove_allow_create_repo_from_user.rb
@@ -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
diff --git a/db/schema.rb b/db/schema.rb
index ad4b28875bc..ed5816ca329 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -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