refactors the way debate searches are done

This commit is contained in:
kikito
2016-02-04 17:26:49 +01:00
parent 90f79e4bd5
commit 014852665d
3 changed files with 27 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
class AddTsvectorToDebates < ActiveRecord::Migration
def up
add_column :debates, :tsv, :tsvector
add_index :debates, :tsv, using: "gin"
end
def down
remove_index :debates, :tsv
remove_column :debates, :tsv
end
end