添加组织表和组织成员表

This commit is contained in:
ouyangxuhua 2015-11-02 17:22:09 +08:00
parent d57e01f17e
commit 636063c6ca
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,8 @@
class DropOrganization < ActiveRecord::Migration
def up
drop_table :organizations
end
def down
end
end

View File

@ -0,0 +1,18 @@
class CreateOrganization < ActiveRecord::Migration
def up
create_table :organizations do |t|
t.string :name
t.text :description
t.integer :creator_id
t.integer :home_id
t.string :domain
t.boolean :is_public
t.timestamps
end
end
def down
drop_table :organizations
end
end

View File

@ -0,0 +1,14 @@
class CreateOrgMembers < ActiveRecord::Migration
def up
create_table :org_members do |t|
t.integer :user_id
t.integer :organization_id
t.string :role
end
end
def down
drop_table :org_members
end
end