X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/52e5fa6ad78f375cec5a207a123a4aa3939c8ddf..88ad9e7f47717d50b7df72b5a316af67ce2f96e7:/db/migrate/20111212183945_add_lowercase_user_indexes.rb diff --git a/db/migrate/20111212183945_add_lowercase_user_indexes.rb b/db/migrate/20111212183945_add_lowercase_user_indexes.rb index 27355b1d1..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 'lib/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