refactors the way debate searches are done
This commit is contained in:
13
db/migrate/20160204134022_add_tsvector_to_debates.rb
Normal file
13
db/migrate/20160204134022_add_tsvector_to_debates.rb
Normal 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
|
||||
Reference in New Issue
Block a user