Sha256: 26d890411e708950b211bb6a767cf3cf3ffba7ca1f29adf63ebe07953b05d4df
Contents?: true
Size: 741 Bytes
Versions: 22
Compression:
Stored size: 741 Bytes
Contents
class AddPgSearchDmetaphoneSupportFunctions < ActiveRecord::Migration def self.up say_with_time("Adding support functions for pg_search :dmetaphone") do if ActiveRecord::Base.connection.send(:postgresql_version) < 80400 execute <<-'SQL' <%= read_sql_file "unnest" %> SQL end execute <<-'SQL' <%= read_sql_file "dmetaphone" %> SQL end end def self.down say_with_time("Dropping support functions for pg_search :dmetaphone") do execute <<-'SQL' <%= read_sql_file "uninstall_dmetaphone" %> SQL if ActiveRecord::Base.connection.send(:postgresql_version) < 80400 execute <<-'SQL' <%= read_sql_file "uninstall_unnest" %> SQL end end end end
Version data entries
22 entries across 22 versions & 1 rubygems