diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-02 18:17:12 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-02 18:17:12 +0300 |
commit | fa3ae24ca7a11f3d87c8838cf05a95dfecfa4c5c (patch) | |
tree | 27288e6e981dd79e46904a6c0942cc1d0d9721e0 /db | |
parent | 2e1c3c52bc43d08bc01cf3ba5fba377b3236223b (diff) | |
download | gitlab-ce-fa3ae24ca7a11f3d87c8838cf05a95dfecfa4c5c.tar.gz |
Group entity. Group has many projects
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20121002150926_create_groups.rb | 11 | ||||
-rw-r--r-- | db/migrate/20121002151033_add_group_id_to_project.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 11 |
3 files changed, 26 insertions, 1 deletions
diff --git a/db/migrate/20121002150926_create_groups.rb b/db/migrate/20121002150926_create_groups.rb new file mode 100644 index 00000000000..ac178294c02 --- /dev/null +++ b/db/migrate/20121002150926_create_groups.rb @@ -0,0 +1,11 @@ +class CreateGroups < ActiveRecord::Migration + def change + create_table :groups do |t| + t.string :name, null: false + t.string :code, null: false + t.integer :owner_id, null: false + + t.timestamps + end + end +end diff --git a/db/migrate/20121002151033_add_group_id_to_project.rb b/db/migrate/20121002151033_add_group_id_to_project.rb new file mode 100644 index 00000000000..683fbfec513 --- /dev/null +++ b/db/migrate/20121002151033_add_group_id_to_project.rb @@ -0,0 +1,5 @@ +class AddGroupIdToProject < ActiveRecord::Migration + def change + add_column :projects, :group_id, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 00bb55234af..ec4729c0c08 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 => 20120905043334) do +ActiveRecord::Schema.define(:version => 20121002151033) do create_table "events", :force => true do |t| t.string "target_type" @@ -25,6 +25,14 @@ ActiveRecord::Schema.define(:version => 20120905043334) do t.integer "author_id" end + create_table "groups", :force => true do |t| + t.string "name", :null => false + t.string "code", :null => false + t.integer "owner_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "issues", :force => true do |t| t.string "title" t.integer "assignee_id" @@ -108,6 +116,7 @@ ActiveRecord::Schema.define(:version => 20120905043334) do t.boolean "wall_enabled", :default => true, :null => false t.boolean "merge_requests_enabled", :default => true, :null => false t.boolean "wiki_enabled", :default => true, :null => false + t.integer "group_id" end create_table "protected_branches", :force => true do |t| |