i might be crazy... (im sure I am) but i deploy the worker & db migration together like this: 1. de

i might be crazy... (im sure I am) but i deploy the worker & db migration together like this:

  1. deploy the new worker script, including the ID of the latest migration
  2. incoming requests check real db value against ID, and will retry db operations until the value matches
  3. while some incoming requests are being held this way, the db migration is performed
this is why the speed of the migration is important for me, and I only can do this because there's only ever max 1 db operation per incoming request. this way I can make breaking changes to the DB schema without having to do the traditional widen-narrow multi-deployment approach
Was this page helpful?