You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create the table in all the tenants' schema except public schema
Below is the configuration, is done in the apartment.rb config file
Expected behavior
rake db:migrate, supposed to create tables in only in tenants' schema. But it is also creating table in public schema.
Actual behavior
Not to create any tables in its public schema through rake db:migrate/rails db:migrate
System configuration
Database: mysql 5.6
Apartment version: > 2
Apartment config (in config/initializers/apartment.rb or so):
config/initializers/apartment.rb
config.excluded_models = %w{ Tenant }
config.tenant_names = lambda do
Tenant.all.each_with_object({}) do |tenant, hash|
hash[tenant.database] = tenant.db_configuration
end
end
use_schemas: (true or false)
commented, by default true as it is stated
Rails (or ActiveRecord) version:
6.0.2
Ruby version:
2.6
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Run the command
rails db:migrate
I want to create the table in all the tenants' schema except public schema
Below is the configuration, is done in the apartment.rb config file
Expected behavior
rake db:migrate, supposed to create tables in only in tenants' schema. But it is also creating table in public schema.
Actual behavior
Not to create any tables in its public schema through
rake db:migrate
/rails db:migrate
System configuration
Database: mysql 5.6
Apartment version: > 2
Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
: (true
orfalse
)commented, by default true as it is stated
Rails (or ActiveRecord) version:
6.0.2
Ruby version:
2.6
The text was updated successfully, but these errors were encountered: