Added UserTeam core models (team and m-t-m relationships) and updated other models

This commit is contained in:
Andrey Kumanyaev 2013-01-19 21:06:50 +04:00 committed by Dmitriy Zaporozhets
parent f6c482c06f
commit 8a86fe7bb0
14 changed files with 248 additions and 28 deletions

View file

@ -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

View file

@ -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

View file

@ -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