Skip to content

OrderNot attempted

Renaming an API field safely

Order the steps to rename the API field price to amount while old tabs are still open.

Drag the rows, or use the arrows, to put them in order from first to last.

  1. Remove price from the backend
  2. Wait until no client still uses price (check logs of the app-version header)
  3. Deploy the frontend that reads and sends only amount
  4. Backend returns and accepts both price and amount
Show answer & explanation

Correct order:

  1. Backend returns and accepts both price and amount
  2. Deploy the frontend that reads and sends only amount
  3. Wait until no client still uses price (check logs of the app-version header)
  4. Remove price from the backend

Expand → migrate → contract. Old and new clients overlap after every deploy, so the backend must support both until the old ones are gone. Removing the field first would break every tab that loaded the old code.