dbos-inc / dbos-transact-ts

The TypeScript framework for backends that scale
https://docs.dbos.dev
MIT License
366 stars 27 forks source link

Handle system DB migration failure for forward compatibility #551

Closed qianl15 closed 3 months ago

qianl15 commented 3 months ago

This PR handles the system DB migration failure correctly so old app versions can still run on the new system DB schema. It is safe because we try not to make any backward incompatible changes.

Specifically, an error may happen if the old version detects a new migration in knex_migrations table but doesn't have the new migration file. With this PR, old versions can correctly proceed to run. This is important when we want to recover pending workflows under old app versions.