901 B
901 B
Refactor V3 Rebuild Runbook
Local Dry Run
- Create an empty local database dedicated to refactor V3.
- Apply
sql/refactor-v3/00-full-schema.sql. - Apply
sql/refactor-v3/01-seed-core.sql. - Run
sql/refactor-v3/99-verify.sql. - Start API against the dry-run database.
- Run
scripts/refactor-v3/local-smoke.ps1.
Online Backup
- Confirm the exact API image tag and current database name.
- Run
scripts/refactor-v3/db-backup-online.ps1. - Record backup path, timestamp, source database, and restore command.
Online Rebuild
- Stop or limit API write traffic.
- Apply full schema and seed scripts.
- Run verify SQL.
- Deploy API/Admin image versions bound to this schema.
- Run online smoke bundle.
Rollback
- Stop write traffic.
- Restore the recorded backup or previous schema bundle.
- Roll back API/Admin images.
- Re-run smoke for the restored version.