mattes / migrate

Database migrations. CLI and Golang library.
Other
2.29k stars 326 forks source link

feature proposal: auto-create database on first Up() #307

Open majewsky opened 6 years ago

majewsky commented 6 years ago

I have an application that usually runs containerized with its own Postgres instance. The Postgres starts out empty, so I added some logic to the app to automatically execute the CREATE DATABASE on the first run before Up() is called (see code over here).

This looks like something that would be useful to have in this library, at least as an option (e.g. as an optional interface that drivers can implement), if it can be made generic enough.