pgautoupgrade / docker-pgautoupgrade

A PostgreSQL Docker container that automatically upgrades your database
https://hub.docker.com/r/pgautoupgrade/pgautoupgrade
MIT License
537 stars 19 forks source link

accommodate POSTGRES_DB different from username but POSTGRES_INITDB_ARGS is not #23

Closed jjb closed 6 months ago

jjb commented 6 months ago

https://github.com/pgautoupgrade/docker-pgautoupgrade/issues/20

justinclift commented 6 months ago

Thanks, that makes sense. Does it fix the problem you were hitting in https://github.com/pgautoupgrade/docker-pgautoupgrade/issues/7#issuecomment-2000386918?

justinclift commented 6 months ago

I'll test this patch right now on my local workstation (takes about an hour), and if it passes ok then I'll merge this and push out updated Docker images with it. :smile:

jjb commented 6 months ago

alas, did not work so far https://github.com/pgautoupgrade/docker-pgautoupgrade/issues/20#issuecomment-2000572760

(sorry to spread this over 2 issues and a PR 😅 )

justinclift commented 6 months ago

No worries. :smile:

justinclift commented 6 months ago

Testing this out again now, in addition to the patch that added support for PG 12.

From a rough eyeballing of this PR, it seems like it should work. Lets see how it goes in the actual build though... :smile:


Should probably add some new tests too, specifically to create non-default database names.

Meh, that can be a later thing for a future PR... :smile:

justinclift commented 6 months ago

This is passing the tests, and looks useful, so has been merged. Thanks for getting this done @jjb. :smile:

Updated Docker images are currently building, and will be on Docker Hub in the next hour or so.


The 12-dev image has been updated to include this PR and manually pushed to Docker Hub already, so you don't need to wait an hour. :smile: