Add local-first recovery contract

This commit is contained in:
Mikhail Chusavitin
2026-03-07 23:16:57 +03:00
parent d2e11b8bdd
commit 5a69e0bba8
3 changed files with 101 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# Contract: Database Patterns (Go / MySQL / MariaDB)
Version: 1.6
Version: 1.7
## MySQL Transaction Cursor Safety (CRITICAL)
@@ -127,6 +127,7 @@ Rules:
## Migration Policy
- For local-first desktop applications, startup and migration recovery must follow the `local-first-recovery` contract.
- Migrations are numbered sequentially and never modified after merge.
- Trigger, take, and verify a fresh backup through the application-owned backup mechanism before applying migrations to any non-ephemeral database.
- Each migration must be reversible where possible (document rollback in a comment).