Sha256: 116ab57956b6923a1a8986e24bf6bf8a202392ab2755cc1446a8630e143c611c
Contents?: true
Size: 459 Bytes
Versions: 142
Compression:
Stored size: 459 Bytes
Contents
# frozen_string_literal: true 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
142 entries across 142 versions & 1 rubygems