PERF: add 'lower(title)' index on topics

This commit is contained in:
Régis Hanol 2015-11-04 00:42:19 +01:00
parent 131ae8486b
commit d56e91f44f
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class AddLowerTitleIndexOnTopics < ActiveRecord::Migration
def up
execute "CREATE INDEX index_topics_on_lower_title ON topics (LOWER(title))"
end
def down
execute "DROP INDEX index_topics_on_lower_title"
end
end