timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.07k stars 157 forks source link

Difficult upgrade process from v4.3.4 to v8.2.0 #357

Closed dmca-glasgow closed 1 year ago

dmca-glasgow commented 1 year ago

Hi there,

Thanks for a great tool, I've used it in production with no problems for ~2 years.

I'm reporting a difficult upgrade process, from v4.3.4 to v8.2.0. (Yes, I should have been upgrading more regularly!)

Aside from the API changes that Typescipt alerted me to, and I found documented on the v7.0.0 release I noticed this error in my logs:

relation "queue.schedule" does not exist

Investigating this was quite hard, as this new table isn't really mentioned anywhere, and the migration that creates it has been removed from the codebase already.

I see now that I was in an unfortunate scenario where I missed one migration— (unlucky) version 13 for release 5.0.0-beta1.

I have to wonder, why were the older migrations removed?

It might be useful to alert the developer when migrations have been missed, comparing the version in the database to the next available migration.

Thanks.

dmca-glasgow commented 1 year ago

Apologies, I just noticed my scenario is mentioned on the v7.4.0 release notes.