Closed leventov closed 4 years ago
I disagree with this, since pg-boss needs to make some assumptions about its schema in order to safely migrate it between versions. The usage docs state that you can uninstall everything from the database with a DROP SCHEMA
statement. Since you were making manual changes outside the scope of install or uninstall, I think it's fair it failed in an unpredictable way.
The code you linked should have thrown an error message indicating the actual problem.
When I dropped
pg-boss
's tables manually (but didn't droppgboss.job_state
type nor thepgboss
schema - I've missed that) it stopped working silently.Maybe plans.js could insert more
IF NOT EXISTS
syntax to make pgboss more robust against this. Alternatively,contractor.js
may add some extra logging here: https://github.com/timgit/pg-boss/blob/master/src/contractor.js#L62 to indicate that the schema is corrupted, at least to make the error more intelligible.