Rebuild fails on db:migrate w/PG12

Hi, If you have a backup of discourse, I’d suggest doing this on a different server to try it out first.

I believe that you experienced this issue while upgrading an instance of discourse that was running an older version.

So, Try installing a copy of discourse by manually editing the yml to use discourse “stable” and pin postgres version to 12.

If the build succeeds, try restoring the backup. Hopefully, it will restore successfully.
If it succeeds, change postgres 12 template back to the default postgres template and comment out the stable tag so that discourse rebuilds with latest tests-passed.

I believe that if the backup is salvageable, it should then be able to survive the postgres and discourse upgrades.

Let me know if you encounter any issues.