Open ghost opened 6 years ago
Configure default schema by setting config.default_schema = 'my_default_schema' in config/initializers/apartment.rb
config.default_schema = 'my_default_schema'
config/initializers/apartment.rb
The default schema works
PG::DuplicateSchema: ERROR: schema "my_default_schema" already exists
Database: (Tell us what database and its version you use.) postgresql 10.3 (same error on 9.6)
Apartment version: 2.2.0
Apartment config (in config/initializers/apartment.rb or so):
use_schemas
true
false
config.default_schema = 'shared' config.tenant_names = -> { Site.pluck :subdomain } config.use_schemas = true config.use_sql = true
config.excluded_models = %w[ Site User ]
* Rails (or ActiveRecord) version: 5.1.5 * Ruby version: 2.5.1 (same error in 2.5.0)
Steps to reproduce
Configure default schema by setting
config.default_schema = 'my_default_schema'
inconfig/initializers/apartment.rb
Expected behavior
The default schema works
Actual behavior
System configuration
Database: (Tell us what database and its version you use.) postgresql 10.3 (same error on 9.6)
Apartment version: 2.2.0
Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
: (true
orfalse
)config.excluded_models = %w[ Site User ]