mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Respect SKIP_TEST_DATABASE
when running rake db:create
(#24407)
Why this change? By default the `db:create` Rake task in activerecord creates the databases for both the development and test environment. This while seemingly odd is by design from Rails. In order to avoid creating the test database, Rails supports the `SKIP_TEST_DATABASE` environment variable which we should respect when creating the multisite test database.
This commit is contained in:
parent
575c2c8573
commit
416cef9ed1
@ -20,7 +20,8 @@ module MultisiteTestHelpers
|
||||
end
|
||||
|
||||
def self.create_multisite?
|
||||
(ENV["RAILS_ENV"] == "test" || !ENV["RAILS_ENV"]) && !ENV["RAILS_DB"] && !ENV["SKIP_MULTISITE"]
|
||||
(ENV["RAILS_ENV"] == "test" || !ENV["RAILS_ENV"]) && !ENV["RAILS_DB"] &&
|
||||
!ENV["SKIP_MULTISITE"] && !ENV["SKIP_TEST_DATABASE"]
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user