Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

carlosantoniodasilva
Copy link
Member

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.

@rafaelfranca
Copy link
Member

:shipit:

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants