X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e660e609661edadc1ed5ad49d6e83e936b2f91cd..febff23c2cad12af3d7da51e5dc2f315487b1f0c:/db/migrate/20111212183945_add_lowercase_user_indexes.rb?ds=inline diff --git a/db/migrate/20111212183945_add_lowercase_user_indexes.rb b/db/migrate/20111212183945_add_lowercase_user_indexes.rb index 4142a642d..f25175590 100644 --- a/db/migrate/20111212183945_add_lowercase_user_indexes.rb +++ b/db/migrate/20111212183945_add_lowercase_user_indexes.rb @@ -1,9 +1,9 @@ -require 'migrate' +require "migrate" class AddLowercaseUserIndexes < ActiveRecord::Migration 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