openstreetmap-website/db/migrate/20140115192822_add_text_index_to_note_comments.rb
2021-05-10 18:52:34 +01:00

9 lines
291 B
Ruby

class AddTextIndexToNoteComments < ActiveRecord::Migration[4.2]
def up
add_index :note_comments, "to_tsvector('english', body)", :using => "GIN", :name => "index_note_comments_on_body"
end
def down
remove_index :note_comments, :name => "index_note_comments_on_body"
end
end