X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/af2b13c2c1c220326241784b1d237d85ff388426..a8c63724f64ef47e94ed739193314161bbdf9e1b:/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 27355b1d1..202b23388 100644 --- a/db/migrate/20111212183945_add_lowercase_user_indexes.rb +++ b/db/migrate/20111212183945_add_lowercase_user_indexes.rb @@ -1,9 +1,9 @@ -require 'lib/migrate' +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, [], :columns => "LOWER(display_name)", :name => "users_display_name_lower_idx" + add_index :users, [], :columns => "LOWER(email)", :name => "users_email_lower_idx" end def down