db-migrate / db-migrate/pg

Drop Db doesn't (can't) work if connected to the db you want to drop

Open
#3 6 comments 0 reactions 0 assignees View on GitHub
bug feature
Dominant language
JavaScript
Stars
68
Forks
50
PR merge metrics
No merged PRs in 30d

Description

The Drop DB command doesn't work if you're trying to drop the database which you're connected to. You can get around this by creating another environment that connects to the template1 or postgres database, and then drop the one you want.

I can't think of an intelligent way to bake this behaviour into the driver so we don't need to use a workaround, any ideas? If you have an implementation idea I'm happy to take a stab at implementing it.
##

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29581165-drop-db-doesn-t-can-t-work-if-connected-to-the-db-you-want-to-drop?utm_campaign=plugin&utm_content=tracker%2F14258523&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F14258523&utm_medium=issues&utm_source=github).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.