Fail hanami db drop when cannot check database existence#281
Fail hanami db drop when cannot check database existence#281kyleplump merged 3 commits intohanami:mainfrom
hanami db drop when cannot check database existence#281Conversation
hanami db drop when cannot check database existence
|
What's the status of this PR? Lately I encountered same issue and independently came up with pretty much same fix as in this PR 😄 thus asking. Would be nice to have it merged because current behavior can be very confusing. |
|
thanks for the nudge @KamilMilewski! @katafrakt - this looks nice to me. should we implement the same behavior with the other two connection types? ( |
|
@kyleplump for SQLite the check is just |
|
Added for MySQL now. Before: After: (also the warning hints some potential problems in the future, but that's out of scope) |
kyleplump
left a comment
There was a problem hiding this comment.
thanks again @katafrakt - sorry missed it on the first pass, but have one update. can we also add spec coverage for the new error? past that lgtm!
Currently if the existence check for a database fails (for example due to whole database server being down or user not existing), Hanami CLI will anyway return information that the database was dropped. This changes it to failing with an explicit error message in such case.
b5332e7 to
498ec6a
Compare
|
@kyleplump specs added |
Currently if the existence check for a database fails (for example due to whole database server being down or user not existing), Hanami CLI will anyway return information that the database was dropped.
This changes it to failing with an explicit error message in such case. Examples:
Addresses #275