Sha256: efa80823cc92c2c05b215cf5424c9dc051a6ab782bbc7f67c4b0184246f990a8
Contents?: true
Size: 428 Bytes
Versions: 35
Compression:
Stored size: 428 Bytes
Contents
module ActiveRecord module Tasks class PostgreSQLDatabaseTasks def drop establish_master_connection connection.select_all <<-SQL.squish SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname='#{configuration['database']}' AND state='idle'; SQL connection.drop_database configuration["database"] end end end end
Version data entries
35 entries across 35 versions & 1 rubygems