Bring back "database already exists" messages when running rake tasks #8837
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running tasks such "rake db:setup", instead of showing messages like
"db_development already exists", it was showing a big stack trace and a
message "Couldn't create database for ..." with the configuration options, a
very confusing message with a big trace.
This brings back the functionality present in 3-2, showing the same message.
Output of both mysql/postgresql:
./master-app [1.9.3-p327-perf] $ rake db:setup masterapp_development already exists masterapp_test already exists -- initialize_schema_migrations_table() ...
And for sqlite3:
./master-app [1.9.3-p327-perf] $ rake db:setup db/development.sqlite3 already exists db/test.sqlite3 already exists -- initialize_schema_migrations_table() ...
These changes should hopefully handle the issue @rubys has been seeing
on master related to the rake tasks.
I'm opening as a pull request to get some quick review before applying.
Let me know about any improvements.