ODYNTIQ // SYSTEMS STUDIOBOOT SEQUENCE
INITIALISING FIELD / SHADERS / TELEMETRY000
O Odyntiq
[ 2026-08-14 ] — DISPATCH

Zero-downtime Odoo migrations: the rehearsal method

How we move 40M+ records between Odoo majors without a maintenance window: dual-run, reconciliation gates, and a reversible cut-over.

Every migration we run follows one rule: the cut-over is the least interesting moment of the project.

The rehearsal loop

  1. Snapshot production into a staging estate nightly.
  2. Replay the migration script against it — timed, measured, diffed.
  3. Reconcile: row counts, valuation totals, VAT indexes, sequence gaps.
  4. Only when three consecutive rehearsals pass clean do we schedule the window.

A migration that has not survived a dry run is not a migration. It is a hope.

Dual-run, not big-bang

Writes go to both estates for a bounded period; reads switch per-module behind a flag. Any divergence pages an engineer — the same engineer who wrote the mapper.

with env.cr.savepoint():
    env["stock.quant"]._rebuild_valuation()

The result: cut-overs that take minutes, and a rollback path that is a flag flip, not a restore.

ODYNTIQ // SIGNAL
01 — Obsidian Field0:00 / 3:00