X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3e99bbf5a9e124a59fc5ae72c863e89af7fa8c46..b17517e02cc9580b89a220d926292166aed25b9b:/db/migrate/20111212183945_add_lowercase_user_indexes.rb?ds=sidebyside diff --git a/db/migrate/20111212183945_add_lowercase_user_indexes.rb b/db/migrate/20111212183945_add_lowercase_user_indexes.rb index 4142a642d..b2c7f6fb1 100644 --- a/db/migrate/20111212183945_add_lowercase_user_indexes.rb +++ b/db/migrate/20111212183945_add_lowercase_user_indexes.rb @@ -1,9 +1,7 @@ -require 'migrate' - -class AddLowercaseUserIndexes < ActiveRecord::Migration +class AddLowercaseUserIndexes < ActiveRecord::Migration[4.2] def up - add_index :users, :display_name, :lowercase => true, :name => "users_display_name_lower_idx" - add_index :users, :email, :lowercase => true, :name => "users_email_lower_idx" + add_index :users, "LOWER(display_name)", :name => "users_display_name_lower_idx" + add_index :users, "LOWER(email)", :name => "users_email_lower_idx" end def down