1 require './db/migrate/20161213172944_full_text_search_indexes'
3 class JsonCollectionProperties < ActiveRecord::Migration
5 ActiveRecord::Base.connection.execute 'DROP INDEX collections_full_text_search_idx'
6 ActiveRecord::Base.connection.execute 'ALTER TABLE collections ALTER COLUMN properties TYPE jsonb USING properties::jsonb'
7 FullTextSearchIndexes.new.replace_index('collections')
11 ActiveRecord::Base.connection.execute 'ALTER TABLE collections ALTER COLUMN properties TYPE text'