2021-12-13 08:57:12.809 UTC [902] discourse@discourse ERROR: column "token" of relation "email_tokens" does not exist
2021-12-13 08:57:12.809 UTC [902] discourse@discourse STATEMENT: ALTER TABLE email_tokens ALTER COLUMN token DROP NOT NULL
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedColumn: ERROR: column "token" of relation "email_tokens" does not exist
For now, we were successful in starting the old container with ./launcher start app after the failed rebuild, but we don’t know whether our database is in a consistent state since the failure occurred part-way through migration.
For our peace of mind, is it known whether the database migration is fully rolled back when a failure like this occurs?
Sounds like a bug. I don’t suppose that you have SKIP_POST_DEPLOYMENT_MIGRATIONS set, so you?
Or, maybe as a work around you can set it to 1 in your app.yml, run the rebuild, and then either change it back and upgrade again or inside the container, set it to zero and migrate on the command line.