Class: Apartment::Configs::PostgresqlConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/apartment/configs/postgresql_config.rb

Overview

PostgreSQL-specific configuration options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePostgresqlConfig

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_resetObject

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_dumpObject

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_schemasObject

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