Updated

db/migrate / 20170613113510_update_archived_petition_indexes.rb

A
24 lines of codes
2 methods
3.0 complexity/method
1 churn
6.0 complexity
0 duplications
class UpdateArchivedPetitionIndexes < ActiveRecord::Migration
  1. UpdateArchivedPetitionIndexes has no descriptive comment
def up execute <<-SQL CREATE INDEX index_archived_petitions_on_action ON archived_petitions USING gin(to_tsvector('english', action)); SQL execute <<-SQL CREATE INDEX index_archived_petitions_on_background ON archived_petitions USING gin(to_tsvector('english', background)); SQL execute <<-SQL CREATE INDEX index_archived_petitions_on_additional_details ON archived_petitions USING gin(to_tsvector('english', additional_details)); SQL end def down execute "DROP INDEX index_archived_petitions_on_action;" execute "DROP INDEX index_archived_petitions_on_background;" execute "DROP INDEX index_archived_petitions_on_additional_details;" end end