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.4.0 lib/postgresql_drop_replacement.rb
thecore-1.3.24 lib/postgresql_drop_replacement.rb
thecore-1.3.23 lib/postgresql_drop_replacement.rb
thecore-1.3.22 lib/postgresql_drop_replacement.rb
thecore-1.3.21 lib/postgresql_drop_replacement.rb
thecore-1.3.20 lib/postgresql_drop_replacement.rb