添加组织表和组织成员表

ke_guange
ouyangxuhua 10 years ago
parent d57e01f17e
commit 636063c6ca

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

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

@ -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
Loading…
Cancel
Save