AGENTS.md@crates/server/migrations · git:20261012.e552692 · 2026-10-12 · sha256 14e2103d8a8f4a34
AGENTS.md@crates/server/migrations git:20261012.e552692A
Immutable. This exact content never changes and is served at /api/v1/blob/14e2103d8a8f4a34.
## Migrations See [`knowledge/operations/migrations.md`](../../../knowledge/operations/migrations.md) for the full specification. Key rules: 1. **Naming:** `just new-migration <description>` creates `YYYYMMDDHHMMSS_<description>.sql` (UTC). Never add a `NNN_` file. The baseline `20261011000000_baseline.sql` replaced 001..222, which stay frozen in `legacy/` for adopting old databases; never edit either. 2. **After rebase:** nothing to renumber. If a newer migration from main must run before yours, recreate yours so it sorts after it. 3. **Release prep:** do not squash or rename existing migrations for a release; keep authored filenames. 4. **Validation:** `scripts/lib/check-migration-ordering.sh` checks names and unique versions; CI runs it on PRs and main, `just pre-push` and `just pre-pr` locally. 5. **Immutability:** once a migration SQL file is merged to `main`, never modify, delete, or rename it. Fixes land as a new migration. CI and `just pre-push` reject modified/deleted/renamed existing migration files.