blob: 06452e0dd87f5a4c843681c532fefdba73787997 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
class AddIndexToUsersUsername < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
add_index :users, :username, unique: true, algorithm: :concurrently
add_index :users, 'lower(username)', unique: true, algorithm: :concurrently, name: 'index_on_users_username_lowercase'
end
end
|