diff options
author | Andrey Kumanyaev <me@zzet.org> | 2013-01-19 21:06:50 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-24 22:31:23 +0200 |
commit | 8a86fe7bb0785ea69e591fd287430eb5448ac64e (patch) | |
tree | 3a171350b30d25daf82b867448d5d88fc78210f8 /db | |
parent | f6c482c06f48449e7dcff34455b5bbdfbd8f6c7b (diff) | |
download | gitlab-ce-8a86fe7bb0785ea69e591fd287430eb5448ac64e.tar.gz |
Added UserTeam core models (team and m-t-m relationships) and updated other models
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20121219183753_create_user_teams.rb | 11 | ||||
-rw-r--r-- | db/migrate/20121220064104_create_user_team_project_relationships.rb | 11 | ||||
-rw-r--r-- | db/migrate/20121220064453_create_user_team_user_relationships.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 25 |
4 files changed, 59 insertions, 0 deletions
diff --git a/db/migrate/20121219183753_create_user_teams.rb b/db/migrate/20121219183753_create_user_teams.rb new file mode 100644 index 00000000000..65c4d053982 --- /dev/null +++ b/db/migrate/20121219183753_create_user_teams.rb @@ -0,0 +1,11 @@ +class CreateUserTeams < ActiveRecord::Migration + def change + create_table :user_teams do |t| + t.string :name + t.string :path + t.integer :owner_id + + t.timestamps + end + end +end diff --git a/db/migrate/20121220064104_create_user_team_project_relationships.rb b/db/migrate/20121220064104_create_user_team_project_relationships.rb new file mode 100644 index 00000000000..8eb654c8728 --- /dev/null +++ b/db/migrate/20121220064104_create_user_team_project_relationships.rb @@ -0,0 +1,11 @@ +class CreateUserTeamProjectRelationships < ActiveRecord::Migration + def change + create_table :user_team_project_relationships do |t| + t.integer :project_id + t.integer :user_team_id + t.integer :greatest_access + + t.timestamps + end + end +end diff --git a/db/migrate/20121220064453_create_user_team_user_relationships.rb b/db/migrate/20121220064453_create_user_team_user_relationships.rb new file mode 100644 index 00000000000..7783b0ae432 --- /dev/null +++ b/db/migrate/20121220064453_create_user_team_user_relationships.rb @@ -0,0 +1,12 @@ +class CreateUserTeamUserRelationships < ActiveRecord::Migration + def change + create_table :user_team_user_relationships do |t| + t.integer :user_id + t.integer :user_team_id + t.boolean :group_admin + t.integer :permission + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 4b3a2243609..88849872ab2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -213,6 +213,31 @@ ActiveRecord::Schema.define(:version => 20130110172407) do t.string "name" end + create_table "user_team_project_relationships", :force => true do |t| + t.integer "project_id" + t.integer "user_team_id" + t.integer "greatest_access" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_team_user_relationships", :force => true do |t| + t.integer "user_id" + t.integer "user_team_id" + t.boolean "group_admin" + t.integer "permission" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_teams", :force => true do |t| + t.string "name" + t.string "path" + t.integer "owner_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "users", :force => true do |t| t.string "email", :default => "", :null => false t.string "encrypted_password", :default => "", :null => false |