From 9fc1a754fe73a145b3a731693922e6b466d569b7 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 19 Dec 2019 11:52:07 -0500 Subject: [PATCH] DEV: Error message if multisite DB can't be created --- lib/tasks/db.rake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index d1af8e7a069..05cf2bd3433 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -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