Sha256: aa96e30f8131e65f759f5ce15110fb84446409111d4b3447a6c6afe25c696dee

Contents?: true

Size: 644 Bytes

Versions: 10

Compression:

Stored size: 644 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

10 entries across 10 versions & 1 rubygems

Version Path
pg_search-0.7.4 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.3 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.2 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.1 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.7.0 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.6.4 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.6.3 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.6.2 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.6.1 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
pg_search-0.6.0 lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb