Bug #28385
closedWhen upgrading to pg10 candlepin migration fails if --upgrade is forgotten
Description
It seems that if foreman-installer is ran without --upgrade, the pg migration won't happen correctly or candlepin migration is omitted. Later when ran with --upgrade, candlepin db will fails since it's DB is missing tables, probably a clean pg 10 db. With Ewoud's help I was able to restore pg9 and rerun the installer with --upgrade. That now prints error about pg10 migration but seems to fix the error state.
I had to rever steps in 30-upgrade, removing syspaths packes so I could install postgres-server. Then started the old version and rerun the installer --upgrade.
However it seems as pretty bad experience for users who don't know about --upgrade. I don't recall running installer without it, but I'm not the only admin of this instance. So if this is the reproducer, I'm afraid many users will hit it.