Added UserTeam core models (team and m-t-m relationships) and updated other models
This commit is contained in:
parent
f6c482c06f
commit
8a86fe7bb0
14 changed files with 248 additions and 28 deletions
11
db/migrate/20121219183753_create_user_teams.rb
Normal file
11
db/migrate/20121219183753_create_user_teams.rb
Normal 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
|
|
@ -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
|
|
@ -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
|
25
db/schema.rb
25
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue