influitive / apartment

Database multi-tenancy for Rack (and Rails) applications
2.67k stars 463 forks source link

duplicate schema error when setting default schema #554

Open ghost opened 6 years ago

ghost commented 6 years ago

Steps to reproduce

Configure default schema by setting config.default_schema = 'my_default_schema' in config/initializers/apartment.rb

Expected behavior

The default schema works

Actual behavior

PG::DuplicateSchema:
  ERROR:  schema "my_default_schema" already exists

System configuration

config.excluded_models = %w[ Site User ]


* Rails (or ActiveRecord) version:
5.1.5
* Ruby version:
2.5.1 (same error in 2.5.0)