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

Version Path
renalware-core-2.0.0.pre.rc7 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.rc6 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.rc5 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.rc4 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.rc3 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.rc1 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta12 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta11 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta10 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta9 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta8 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta7 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta6 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta5 config/initializers/postgresql_database_tasks.rb
renalware-core-2.0.0.pre.beta4 config/initializers/postgresql_database_tasks.rb