]> git.openstreetmap.org Git - rails.git/blob - db/migrate/20111212183945_add_lowercase_user_indexes.rb
Merge remote-tracking branch 'upstream/pull/5288'
[rails.git] / db / migrate / 20111212183945_add_lowercase_user_indexes.rb
1 class AddLowercaseUserIndexes < ActiveRecord::Migration[4.2]
2   def up
3     add_index :users, "LOWER(display_name)", :name => "users_display_name_lower_idx"
4     add_index :users, "LOWER(email)", :name => "users_email_lower_idx"
5   end
6
7   def down
8     remove_index :users, :name => "users_email_lower_idx"
9     remove_index :users, :name => "users_display_name_lower_idx"
10   end
11 end