Sha256: 48ddd94cadc89727a68912aa87414f8d8f6dea375bfbfd811059c11273501139

Contents?: true

Size: 624 Bytes

Versions: 12

Compression:

Stored size: 624 Bytes

Contents

class AddPgSearchAssociatedAgainstSupportFunctions < ActiveRecord::Migration
  def self.up
    say_with_time("Adding support functions for pg_search :associated_against") do
      if ActiveRecord::Base.connection.send(:postgresql_version) < 80400
        execute <<-'SQL'
<%= read_sql_file "array_agg" %>
        SQL
      end
    end
  end

  def self.down
    say_with_time("Dropping support functions for pg_search :associated_against") do
      if ActiveRecord::Base.connection.send(:postgresql_version) < 80400
        execute <<-'SQL'
<%= read_sql_file "uninstall_array_agg" %>
        SQL
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pg_search-1.0.6 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-1.0.5 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-1.0.4 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-1.0.3 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-1.0.2 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-1.0.1 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-1.0.0 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.9 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.8 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.7 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.6 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.5 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb