proposal: creating and dropping databases
It's possible this is beyond the scope of what goose is intended. Feedback welcome.
Consider adding the ability to create / drop a database either directly with psql/pg_* and friends if found locally, or by pulling & running a lightweight postgres alpine container.
I've been experimenting with an implementation that could be retrofitted into goose to provide this functionality. We've been using it for ~4 months and its been working well. (consistency, reproducibility, etc.)
The ultimate idea is goose could be used not only for migrations, but for all the steps most devs require during local dev and CI.
-
create a database (if not exists) .. requires docker or psql locally
-
apply migrations .. pure goose
-
(separate PR proposal) dump the latest schema file .. requires docker or pg_dump locally
-
import a DB from a sql file (from step 3) .. requires docker or pg_restore locally
how about this issue
+1