diff --git a/db/migrate/20151102083844_drop_organization.rb b/db/migrate/20151102083844_drop_organization.rb new file mode 100644 index 000000000..1abb0f6d9 --- /dev/null +++ b/db/migrate/20151102083844_drop_organization.rb @@ -0,0 +1,8 @@ +class DropOrganization < ActiveRecord::Migration + def up + drop_table :organizations + end + + def down + end +end diff --git a/db/migrate/20151102084419_create_organization.rb b/db/migrate/20151102084419_create_organization.rb new file mode 100644 index 000000000..af84ebee9 --- /dev/null +++ b/db/migrate/20151102084419_create_organization.rb @@ -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 diff --git a/db/migrate/20151102090519_create_org_members.rb b/db/migrate/20151102090519_create_org_members.rb new file mode 100644 index 000000000..037d8a3c6 --- /dev/null +++ b/db/migrate/20151102090519_create_org_members.rb @@ -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