DB=custom rake db:drop not supported?
jooeycheng opened this issue · 6 comments
I noticed the command drops all databases, instead of just the specified database. Also, i do not see this command being documented on the Readme.
Just wondering if I'm missing something, or if multiverse
does not support this.
Thanks!
Hey @jooeycheng, I'm unable to reproduce. db:drop
drops both the development and test databases (as Rails does without Multiverse), but it doesn't drop any others. Can you add a failing condition to test/multiverse_test.rb
?
Hey @ankane, I think my description was unclear. When i mentioned "drops all databases", I was referring to multiverse dropping the host app's db, and the "custom multiverse db", when we run DB=custom rake db:drop
.
I was expecting it to only drop the custom db, and not drop the host app db.
As far as I can tell, it does only drops the custom DB, but feel free to update the tests to prove otherwise.
This seems to be happening to me too. Even if I set DB
, rake db:drop
will drop the main database. However, if I set DB
to an unknown value then the task will not execute with the normal "Unknown DB:" error.
I suspect that multiverse isn't overriding some specific code that is used by the db:drop
task.
Rails 4.2.11
Hey @Mange, as I mentioned above, I’m not able to reproduce, so please add a failing test condition if you can.
Hmm, I also cannot reproduce on a new Rails app. I'm going to see if I can isolate it in my codebase to find a root cause.