Sha256: 9ac937e1564050144053a20d9f70b9963d20c5b8e2addab7ce51f853daa53eee

Contents?: true

Size: 414 Bytes

Versions: 31

Compression:

Stored size: 414 Bytes

Contents

require_relative 'database_adapter'

class PostgresqlAdapter < DatabaseAdapter
  def database_configuration
    {
      adapter: 'postgresql',
      database: @database,
      user: 'postgres',
      schema_search_path: 'public'
    }
  end

  def reset_database!
    ActiveRecord::Base.connection.execute('drop schema public cascade;')
    ActiveRecord::Base.connection.execute('create schema public;')
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
microscope-0.5.6 spec/support/macros/database/postgresql_adapter.rb
microscope-0.5.5 spec/support/macros/database/postgresql_adapter.rb
microscope-0.5.4 spec/support/macros/database/postgresql_adapter.rb
microscope-0.5.3 spec/support/macros/database/postgresql_adapter.rb
microscope-0.5.2 spec/support/macros/database/postgresql_adapter.rb
activerecord_json_validator-0.1.3 spec/support/macros/database/postgresql_adapter.rb
activerecord_json_validator-0.1.2 spec/support/macros/database/postgresql_adapter.rb
activerecord_json_validator-0.1.1 spec/support/macros/database/postgresql_adapter.rb
activerecord_json_validator-0.1 spec/support/macros/database/postgresql_adapter.rb
microscope-0.5.1 spec/support/macros/database/postgresql_adapter.rb
microscope-0.5 spec/support/macros/database/postgresql_adapter.rb