scinote-web/db/migrate/20160118114850_remove_private_organizations.rb

14 lines
392 B
Ruby
Raw Normal View History

2017-06-30 16:23:28 +08:00
class RemovePrivateOrganizations < ActiveRecord::Migration[4.2]
2016-02-12 23:52:43 +08:00
def up
2017-01-26 23:30:31 +08:00
remove_foreign_key :teams, column: :private_user_id
remove_index :teams, :private_user_id
remove_column :teams, :private_user_id
2016-02-12 23:52:43 +08:00
end
def down
2017-01-26 23:30:31 +08:00
add_column :teams, :private_user_id, :integer
add_index :teams, :private_user_id
add_foreign_key :teams, :users, column: :private_user_id
2016-02-12 23:52:43 +08:00
end
end