Class: Apartment::Configs::PostgresqlConfig
- Inherits:
-
Object
- Object
- Apartment::Configs::PostgresqlConfig
- Defined in:
- lib/apartment/configs/postgresql_config.rb
Overview
PostgreSQL-specific configuration options.
Instance Attribute Summary collapse
-
#enforce_search_path_reset ⇒ Object
Whether to verify search_path resets to default after switching away from a tenant.
-
#include_schemas_in_dump ⇒ Object
Non-public schemas to include in schema dumps (e.g., %w[ext shared]).
-
#persistent_schemas ⇒ Object
Schemas that persist across all tenants (e.g., shared extensions).
Instance Method Summary collapse
-
#freeze! ⇒ Object
Freeze mutable collections, then freeze self.
-
#initialize ⇒ PostgresqlConfig
constructor
A new instance of PostgresqlConfig.
Constructor Details
#initialize ⇒ PostgresqlConfig
Returns a new instance of PostgresqlConfig.
16 17 18 19 20 |
# File 'lib/apartment/configs/postgresql_config.rb', line 16 def initialize @persistent_schemas = [] @enforce_search_path_reset = false @include_schemas_in_dump = [] end |
Instance Attribute Details
#enforce_search_path_reset ⇒ Object
Whether to verify search_path resets to default after switching away from a tenant.
11 12 13 |
# File 'lib/apartment/configs/postgresql_config.rb', line 11 def enforce_search_path_reset @enforce_search_path_reset end |
#include_schemas_in_dump ⇒ Object
Non-public schemas to include in schema dumps (e.g., %w[ext shared]).
14 15 16 |
# File 'lib/apartment/configs/postgresql_config.rb', line 14 def include_schemas_in_dump @include_schemas_in_dump end |
#persistent_schemas ⇒ Object
Schemas that persist across all tenants (e.g., shared extensions).
8 9 10 |
# File 'lib/apartment/configs/postgresql_config.rb', line 8 def persistent_schemas @persistent_schemas end |
Instance Method Details
#freeze! ⇒ Object
Freeze mutable collections, then freeze self.
23 24 25 26 27 |
# File 'lib/apartment/configs/postgresql_config.rb', line 23 def freeze! @persistent_schemas.freeze @include_schemas_in_dump.freeze freeze end |