DEV: Error message if multisite DB can't be created

This commit is contained in:
Robin Ward 2019-12-19 11:52:07 -05:00
parent 069bc70bd4
commit 9fc1a754fe
1 changed files with 8 additions and 1 deletions

View File

@ -32,7 +32,14 @@ end
task 'db:create' => [:load_config] do |_, args|
if MultisiteTestHelpers.create_multisite?
system("RAILS_ENV=test RAILS_DB=discourse_test_multisite rake db:create")
unless system("RAILS_ENV=test RAILS_DB=discourse_test_multisite rake db:create")
STDERR.puts "-" * 80
STDERR.puts "ERROR: Could not create multisite DB. A common cause of this is a plugin"
STDERR.puts "checking the column structure when initializing, which raises an error."
STDERR.puts "-" * 80
raise "Could not initialize discourse_test_multisite"
end
end
end