-
Notifications
You must be signed in to change notification settings - Fork 460
excluded_models does not works with db:setup #664
Copy link
Copy link
Open
Description
Steps to reproduce
Configure excluded models.
Apartment.configure do |config|
config.excluded_models = ["Company"]
end
db/seeds.rb is as below.
Company.create
Apartment::Tenant.create('some_tenant') do
puts "companies: #{Company.count}"
end
And call db:setup. (assume that 'public' tenant does not exist)
rails db:setup
Outputs this.
companies: 0
Expected behavior
excluded_models have effect also in db:setup.
Actual behavior
excluded_models have no effect in db:setup.
System configuration
-
Database: mysql 5.6
-
Apartment version: 2.2.1
-
Apartment config (in
config/initializers/apartment.rbor so):use_schemas: default (true)prepend_environment: true
-
Rails (or ActiveRecord) version: 5.2.4.5
-
Ruby version: 2.5.8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels