Skip to content

Plan

Every step below is cheap and safe on its own. Only the order decides whether the deploy that is still running survives. Put them in one and the simulator runs it.

The change

`orders.note` should be called `memo`. The previous deploy is still serving and still selects `note`. Put these five steps in an order that never breaks it.

8 minutes

Your order

  1. 1

    Deploy code that writes both columns and reads the old one

    a deploy, not a statement

  2. 2

    Deploy code that reads the new column

    a deploy, not a statement

  3. 3

    Backfill the new column from the old

    UPDATE orders SET memo = note;
  4. 4

    Add the new column beside the old one

    ALTER TABLE orders ADD COLUMN memo varchar(64);
  5. 5

    Wait for the last instance of the old version to stop

    a deploy, not a statement

Nothing has run yet. Which order survives the deploy window is the question.

Everything you do here stays in this browser.Part of liter8.sh