diff options
Diffstat (limited to 'docs/SCHEMA.md')
| -rw-r--r-- | docs/SCHEMA.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/SCHEMA.md b/docs/SCHEMA.md index 2100990..89dd0b1 100644 --- a/docs/SCHEMA.md +++ b/docs/SCHEMA.md @@ -484,8 +484,11 @@ another voucher is posted in between) — clients must not persist it. and `created_at`. Current version: **3** (v3 replaces the seeded moms rules with the corrected mapping; v2 adds the two template tables). - Migrations are forward-only, applied automatically at daemon start, each in - one transaction, and require an automatic `VACUUM INTO` snapshot next to the - database before starting (`bokfd.db.pre-migration-<version>`). + one transaction. Before the first migration statement a consistent + `VACUUM INTO` snapshot is written to + `<backup_dir>/pre-migration-v<old>-<UTC timestamp>.db` (a numeric suffix is + added when the name is taken); if the snapshot cannot be taken the upgrade + is aborted and the database is left at its old version. - `audit.verify` must pass before and after any migration; migrations never rewrite ledger rows. |
