scinote-web/db/migrate/20160118114850_remove_private_organizations.rb
2017-01-26 16:30:31 +01:00

13 lines
387 B
Ruby

class RemovePrivateOrganizations < ActiveRecord::Migration
def up
remove_foreign_key :teams, column: :private_user_id
remove_index :teams, :private_user_id
remove_column :teams, :private_user_id
end
def down
add_column :teams, :private_user_id, :integer
add_index :teams, :private_user_id
add_foreign_key :teams, :users, column: :private_user_id
end
end