We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apartment::Tenant.create('tenant_name') - using schema.rb instead of pg_dump for creating new schemas
change in apartment.rb file config.use_sql = true
Run Apartment::Tenant.create('tenant_name')
Use raw SQL dumps instead of schema.rb.
Using schema.rb to generate tables.
Getting below issue ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "table2" does not exist) : CREATE TABLE "table1"
the "table2" that does not exist is created next to the "table1" in the schema.rb file.
Database: (Tell us what database and its version you use.) psql (PostgreSQL) 11.13
Apartment version: ros-apartment (2.11.0)
Apartment config (in config/initializers/apartment.rb or so): config.tenant_names = ['tenant1','tenant2'] config.use_schemas = true config.use_sql = true
config/initializers/apartment.rb
Rails (or ActiveRecord) version: activerecord (5.2.2)
Ruby version: ruby 2.7.2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Apartment::Tenant.create('tenant_name') - using schema.rb instead of pg_dump for creating new schemas
Steps to reproduce
change in apartment.rb file
config.use_sql = true
Run Apartment::Tenant.create('tenant_name')
Expected behavior
Use raw SQL dumps instead of schema.rb.
Actual behavior
Using schema.rb to generate tables.
Getting below issue
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "table2" does not exist)
: CREATE TABLE "table1"
the "table2" that does not exist is created next to the "table1" in the schema.rb file.
System configuration
Database: (Tell us what database and its version you use.)
psql (PostgreSQL) 11.13
Apartment version:
ros-apartment (2.11.0)
Apartment config (in
config/initializers/apartment.rb
or so):config.tenant_names = ['tenant1','tenant2']
config.use_schemas = true
config.use_sql = true
Rails (or ActiveRecord) version:
activerecord (5.2.2)
Ruby version:
ruby 2.7.2
The text was updated successfully, but these errors were encountered: