scinote-web/db/migrate/20151022123530_remove_unique_organization_name_index.rb

12 lines
267 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
class RemoveUniqueOrganizationNameIndex < ActiveRecord::Migration
def up
remove_index :organizations, :name
add_index :organizations, :name
end
def down
remove_index :organizations, :name
add_index :organizations, :name, unique: true
end
end