Add CLI option --force to command dbmate drop to execute DROP DATABASE <db> WITH (FORCE)
#748
maximilian-hammerl
started this conversation in
Feature Ideas
Replies: 1 comment
-
|
On one hand, I understand the desire to make this change. I'm sure it'll be convenient in some very specific situations. On the other hand, this feels like it could turn into a very dangerous foot-gun. If your database server software is unwilling to drop a database, maybe it's for the best that the user has to deal with whatever that reason is, rather than allowing brute force to perform one of the most destructive operations you can perform on a database. This may just be a situation where you are better off using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
DROP DATABSE <db>can fail for a multitude of reasons (for example https://stackoverflow.com/questions/17449420/postgresql-unable-to-drop-database-because-of-some-auto-connections-to-db). In these situations executingDROP DATABASE <db> WITH (FORCE)instead is necessary.It would be great if the CLI option
--forcecould be added to the commanddbmate drop, so thatDROP DATABASE <db> WITH (FORCE)would be executed instead ofDROP DATABASE <db>.(I am open to implementing this if there is positive feedback on this feature request.)
Beta Was this translation helpful? Give feedback.
All reactions