Files
grecia/db/migrate/20151028221647_add_pg_trgm_extension.rb
2019-04-23 17:12:47 +02:00

12 lines
307 B
Ruby

class AddPgTrgmExtension < ActiveRecord::Migration[4.2]
def change
return if extension_enabled?('pg_trgm')
begin
enable_extension 'pg_trgm'
rescue StandardError => e
raise "Could not create extension pg_trgm. Please contact with your system administrator: #{e}"
end
end
end