Cleanup our migrations, replacing as much of our custom code and monkey patching with modern standard rails methods.
13 lines
423 B
Ruby
13 lines
423 B
Ruby
require 'migrate'
|
|
|
|
class AddLowercaseUserIndexes < ActiveRecord::Migration
|
|
def up
|
|
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
|
|
remove_index :users, :name => "users_email_lower_idx"
|
|
remove_index :users, :name => "users_display_name_lower_idx"
|
|
end
|
|
end
|