Sha256: dc1bcbb2539cf16ea22ea26e3cdbf5c793f20553edf58aa2e07ea05b0e0d7cda

Contents?: true

Size: 659 Bytes

Versions: 31

Compression:

Stored size: 659 Bytes

Contents

if defined? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
  if ActiveRecord::Base.connection.kind_of? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
    begin
      ActiveRecord::Base.connection.execute("SELECT set_limit(0.15);")
    rescue ActiveRecord::StatementInvalid => e
      if e.message.include? 'function set_limit(numeric) does not exist'
        puts 'Trigram set_limit can\'t be executed while the install_trigram migration isn\'t done'
        puts 'This happens when migrating for the first time'
        puts 'Try running rake express_admin_engine:install:migrations in the main app then rake db:migrate'
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
express_admin-2.0.0.b config/initializers/postgresql_trigram.rb
express_admin-2.0.0.a config/initializers/postgresql_trigram.rb
express_admin-1.8.1 config/initializers/postgresql_trigram.rb
express_admin-1.8.0 config/initializers/postgresql_trigram.rb
express_admin-1.7.32 config/initializers/postgresql_trigram.rb
express_admin-1.7.31 config/initializers/postgresql_trigram.rb
express_admin-1.7.30 config/initializers/postgresql_trigram.rb
express_admin-1.7.29 config/initializers/postgresql_trigram.rb
express_admin-1.7.28 config/initializers/postgresql_trigram.rb
express_admin-1.7.27 config/initializers/postgresql_trigram.rb
express_admin-1.7.26 config/initializers/postgresql_trigram.rb
express_admin-1.7.25 config/initializers/postgresql_trigram.rb
express_admin-1.7.24 config/initializers/postgresql_trigram.rb
express_admin-1.7.23 config/initializers/postgresql_trigram.rb
express_admin-1.7.22 config/initializers/postgresql_trigram.rb
express_admin-1.7.21 config/initializers/postgresql_trigram.rb
express_admin-1.7.20 config/initializers/postgresql_trigram.rb
express_admin-1.7.19 config/initializers/postgresql_trigram.rb
express_admin-1.7.18 config/initializers/postgresql_trigram.rb
express_admin-1.7.17 config/initializers/postgresql_trigram.rb