Strengthen backup and secret handling contracts

This commit is contained in:
Mikhail Chusavitin
2026-03-07 22:03:49 +03:00
parent f55bd84668
commit d2e11b8bdd
4 changed files with 88 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# Contract: Database Patterns (Go / MySQL / MariaDB)
Version: 1.5
Version: 1.6
## MySQL Transaction Cursor Safety (CRITICAL)
@@ -123,6 +123,7 @@ Rules:
- The operator must know how to restore from that backup before applying the change.
- If a migration or script is intended for production/staging, the rollout instructions must state the backup step explicitly.
- The backup taken before a migration must be triggered by the application's own backup mechanism, not by assuming `mysql`, `mysqldump`, or other DB client tools exist on the user's machine.
- Before a migration starts, double-check that backup output resolves outside the git worktree and is not tracked or staged in git.
## Migration Policy