Files
nairobi/db/migrate/20161129011737_add_tsv_to_poll_questions.rb
2016-11-29 11:46:30 +01:00

12 lines
268 B
Ruby

class AddTsvToPollQuestions < ActiveRecord::Migration
def up
add_column :poll_questions, :tsv, :tsvector
add_index :poll_questions, :tsv, using: "gin"
end
def down
remove_index :poll_questions, :tsv
remove_column :poll_questions, :tsv
end
end