scinote-web/db/migrate/20151021082639_add_pg_trgm_support.rb
2017-06-30 10:23:28 +02:00

16 lines
329 B
Ruby

require File.expand_path('app/helpers/database_helper')
include DatabaseHelper
class AddPgTrgmSupport < ActiveRecord::Migration[4.2]
def up
if db_adapter_is? "PostgreSQL" then
create_extension :pg_trgm
end
end
def down
if db_adapter_is? "PostgreSQL" then
drop_extension :pg_trgm
end
end
end