Bring back "database already exists" messages when running rake tasks #8837

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

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.

Owner

rafaelfranca commented Jan 9, 2013

:shipit:

@carlosantoniodasilva carlosantoniodasilva Bring back "database already exists" messages when running rake tasks
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.
8f232b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment