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.5.10 lib/postgresql_drop_replacement.rb
thecore-1.5.9 lib/postgresql_drop_replacement.rb
thecore-1.5.8 lib/postgresql_drop_replacement.rb
thecore-1.5.7 lib/postgresql_drop_replacement.rb
thecore-1.5.6 lib/postgresql_drop_replacement.rb
thecore-1.5.5 lib/postgresql_drop_replacement.rb
thecore-1.5.4 lib/postgresql_drop_replacement.rb
thecore-1.5.3 lib/postgresql_drop_replacement.rb
thecore-1.5.2 lib/postgresql_drop_replacement.rb
thecore-1.5.1 lib/postgresql_drop_replacement.rb
thecore-1.5.0 lib/postgresql_drop_replacement.rb
thecore-1.4.10 lib/postgresql_drop_replacement.rb
thecore-1.4.8 lib/postgresql_drop_replacement.rb
thecore-1.4.7 lib/postgresql_drop_replacement.rb
thecore-1.4.6 lib/postgresql_drop_replacement.rb
thecore-1.4.5 lib/postgresql_drop_replacement.rb
thecore-1.4.4 lib/postgresql_drop_replacement.rb
thecore-1.4.3 lib/postgresql_drop_replacement.rb
thecore-1.4.2 lib/postgresql_drop_replacement.rb
thecore-1.4.1 lib/postgresql_drop_replacement.rb