Class: Apartment::Adapters::PostgresqlSchemaFromSqlAdapter

Inherits:
PostgresqlSchemaAdapter show all
Defined in:
lib/apartment/adapters/postgresql_adapter.rb

Overview

Another Adapter for Postgresql when using schemas and SQL

Constant Summary collapse

PSQL_DUMP_BLACKLISTED_STATEMENTS =
[
  /SET search_path/i,                           # overridden later
  /SET lock_timeout/i,                          # new in postgresql 9.3
  /SET row_security/i,                          # new in postgresql 9.5
  /SET idle_in_transaction_session_timeout/i,   # new in postgresql 9.6
  /CREATE SCHEMA public/i,
  /COMMENT ON SCHEMA public/i,

]

Instance Attribute Summary

Attributes inherited from AbstractAdapter

#default_tenant

Instance Method Summary collapse

Methods inherited from PostgresqlSchemaAdapter

#current, #initialize, #reset

Methods inherited from AbstractAdapter

#create, #current, #drop, #each, #environmentify, #initialize, #process_excluded_models, #reset, #seed_data, #switch, #switch!

Constructor Details

This class inherits a constructor from Apartment::Adapters::PostgresqlSchemaAdapter

Instance Method Details

#import_database_schemaObject



118
119
120
121
122
123
# File 'lib/apartment/adapters/postgresql_adapter.rb', line 118

def import_database_schema
  preserving_search_path do
    clone_pg_schema
    copy_schema_migrations
  end
end