Divvent

For Divvent’s own team. It is generated from the operations document in our repository, which is the one to edit. If you use Divvent, the help centre is for you.

3. Rolling back

divvent deploy <modelDir> --rollback --tenant <tenant>

Puts the Worker back to the version this environment was serving before the last deploy. The environment comes from the state the deploy recorded, not from a flag: a rollback undoes a deploy that happened, and which environment that was is a fact rather than a choice.

Code only. To bring the data back as well:

divvent deploy <modelDir> --rollback --restore --tenant <tenant>

--restore puts the database back to the Time Travel bookmark the deploy took before it migrated. Thirty days, which is the whole of the rollback window — D1's retention, not a setting. Anything longer is the nightly dump.

A trial rolls back as a trial: pass the same --instance its deploy had (<application>--<trial>). The deploy records the instance it composed, and the rollback takes the target from that record and refuses a different one, so a trial's rollback cannot reach production's Worker or production's database. It used to derive the names from the tenant alone, which composed production's.

Things it will refuse, before anything moves, and each is correct:

A restore happens at most once per deploy. Running the rollback again resumes it — the Worker is pointed at the same version — and does not restore a second time, which would discard the writes made in between.

3.1 Through the queue: a customer's rollback

A rollback the portal asks for is a platform_deploy_request of kind rollback, and divvent deploys performs it by running exactly the command above, on the target the request names:

divvent deploy <materialised revision> --env prod --tenant <slug> [--instance <slug>--<trial>] --via <env> --rollback [--restore] --json

---