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

Version Path
pg_search-1.0.6 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-1.0.5 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-1.0.4 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-1.0.3 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-1.0.2 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-1.0.1 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-1.0.0 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.9 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.8 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.7 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.6 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.5 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.4 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.3 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.2 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.1 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.7.0 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.6.4 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.6.3 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
pg_search-0.6.2 lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb