mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-16 17:09:09 +00:00
check-migration-numbering keeps the no-gap and duplicate rules for the legacy series only (exactly three digits, 001 to 239, frozen on 2026-11-13) and now also fails when the first or last legacy file disappears. New files must be YYYYMMDDHHMMSS_snake_case.sql: a real UTC date, not before the cutover, not more than ten minutes in the future, and unique. Anything else, including a legacy-style 240_x.sql, is rejected with the reason and a hint. scripts/dev/new-migration.mjs writes the file with the current UTC timestamp, moves forward one second on a collision and never overwrites. The naming rules live in scripts/check/lib/migrationNaming.mjs, shared by the gate and the generator. DATABASE_GUIDE and src/lib/db/AGENTS.md describe the format.