You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/db/migrate/20190505093440_init_use_ind...

10 lines
443 B

6 years ago
class InitUseIndex < ActiveRecord::Migration[5.2]
def change
remove_index :users, name: :index_users_on_login if index_exists?(:users, :login, name: :index_users_on_login)
remove_index :users, name: :index_users_on_mail if index_exists?(:users, :mail, name: :index_users_on_mail)
# add_index :users, :login, unique: true
# add_index :users, :mail, unique: true
# add_index :users, :phone, unique: true
6 years ago
end
end