20170322021028_add_lowercase_index_to_accounts.rb 329 B

1234567891011
  1. # frozen_string_literal: true
  2. class AddLowercaseIndexToAccounts < ActiveRecord::Migration[5.0]
  3. def up
  4. execute 'CREATE INDEX index_accounts_on_username_and_domain_lower ON accounts (lower(username), lower(domain))'
  5. end
  6. def down
  7. remove_index :accounts, name: 'index_accounts_on_username_and_domain_lower'
  8. end
  9. end