-- application paused: ALTER TABLE in progress

The application server is paused while a schema change runs on the primary database. The change rewrites every row in two tables.

-- migration 0042
BEGIN;
ALTER TABLE orders
  ADD COLUMN tax_rate numeric(6,4) NOT NULL DEFAULT 0,
  ADD COLUMN currency char(3) NOT NULL DEFAULT 'EUR',
  ALTER COLUMN total_cents TYPE bigint;
COMMIT;

-- migration 0043
CREATE INDEX CONCURRENTLY idx_orders_currency
  ON orders (currency, placed_at);
-- estimated time: 22 minutes on 22.4M rows

migration 1 of 2 · 54% · ~ 9 min remaining

No data loss is possible — the migration runs in a transaction with a fresh backup ready. Reads are paused; writes are queued and replayed when we unlock the table.
EnginePostgreSQL 16.3
Rows total22,418,000
Rows rewritten12,127,302
Started04:12 UTC
ETA≈ 35 min
— Glasswright Commercechange CHG-2026-06-1112