Sha256: d5181e33ce2e0b4b73a7a21e3d7e39353290ba94e075367f34f5d31600426f96

Contents?: true

Size: 374 Bytes

Versions: 46

Compression:

Stored size: 374 Bytes

Contents

module ActiveRecord
  module Tasks
    class PostgreSQLDatabaseTasks
      def drop
        establish_master_connection
        connection.select_all "select pg_terminate_backend(pg_stat_activity.pid) from pg_stat_activity where datname='#{configuration['database']}' AND state='idle';"
        connection.drop_database configuration['database']
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
thecore-1.7.7 lib/postgresql_drop_replacement.rb
thecore-1.7.5 lib/postgresql_drop_replacement.rb
thecore-1.7.3 lib/postgresql_drop_replacement.rb
thecore-1.7.2 lib/postgresql_drop_replacement.rb
thecore-1.7.1 lib/postgresql_drop_replacement.rb
thecore-1.7.0 lib/postgresql_drop_replacement.rb
thecore-1.6.13 lib/postgresql_drop_replacement.rb
thecore-1.6.10 lib/postgresql_drop_replacement.rb
thecore-1.6.9 lib/postgresql_drop_replacement.rb
thecore-1.6.8 lib/postgresql_drop_replacement.rb
thecore-1.6.7 lib/postgresql_drop_replacement.rb
thecore-1.6.5 lib/postgresql_drop_replacement.rb
thecore-1.6.4 lib/postgresql_drop_replacement.rb
thecore-1.6.3 lib/postgresql_drop_replacement.rb
thecore-1.6.2 lib/postgresql_drop_replacement.rb
thecore-1.6.1 lib/postgresql_drop_replacement.rb
thecore-1.6.0 lib/postgresql_drop_replacement.rb
thecore-1.5.14 lib/postgresql_drop_replacement.rb
thecore-1.5.13 lib/postgresql_drop_replacement.rb
thecore-1.5.12 lib/postgresql_drop_replacement.rb