opengisch / pum

Postgres Upgrades Manager
GNU General Public License v2.0
30 stars 7 forks source link

test-and-upgrade command shoud drop the qwat_test DB ? #12

Closed sylvainbeo closed 6 years ago

sylvainbeo commented 6 years ago

Launch the command :

pum test-and-upgrade -pp qwat_prod -pt qwat_test -pc qwat_comp -t qwat_sys.info -d /home/sbe/projects/qwat_project/data-model/update/delta/ -f /home/sbe/tmp/qwat_dump -i columns constraints views sequences indexes triggers functions rules

Should pum drop and recreate the qwat_test DB by its own ? Because, if the command fail, we have to drop and recreate the qwta_test DB manually.

haubourg commented 6 years ago

Hi, same issue here. Maybe not dropping, but using pg_restore --clean option could work?

ponceta commented 6 years ago

Same here.

sylvainbeo commented 6 years ago

@marioba @m-kuhn @elemoine Any thought on that ?

elemoine commented 6 years ago

If test-and-upgrade did not create the test database I don't think it should drop it.

sylvainbeo commented 6 years ago

@elemoine Well then we have to find a good way to manage that. Because this is very disturbing when using PUM. You always forget to drop and recreate the DB manually, and you've got errors, and for a few minutes you don't understand the errors...

elemoine commented 6 years ago

To me this is an issue on the Pum user side.

sylvainbeo commented 6 years ago

Ok, we've discuss this. I'm closing this ticket. See https://github.com/qwat/qwat-data-model/issues/223 for more.