Sha256: 2e881b25d0e15e8978fb6ef9bb47589c1fac5b7fe986604410b75c9d075825c6
Contents?: true
Size: 693 Bytes
Versions: 31
Compression:
Stored size: 693 Bytes
Contents
class InstallTrigram < ActiveRecord::Migration def self.up # NOTE: This should probably be a rake task not a migration. if defined? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter if ActiveRecord::Base.connection.kind_of? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm;") end end end def self.down if defined? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter if ActiveRecord::Base.connection.kind_of? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter ActiveRecord::Base.connection.execute("DROP EXTENSION pg_trgm;") end end end end
Version data entries
31 entries across 31 versions & 1 rubygems