Two database migrations can be authored independently with the same placeholder timestamp and both PRs can pass on their own. Once both reach main, SQLx sees the duplicate version and fresh database migrations stop.
What this involves
- Add a standalone
migration-police CI job that checks only newly added SQL migration filenames and rejects 14-digit timestamps whose minute-and-second suffix is 0000.
- Print a GitHub Actions error naming each invalid migration and the required
YYYYMMDDhhmmss_description.sql format, so the reason is clear in the migration-police log.
- Leave existing migrations alone -- the check only applies to files added by the PR.
- Add the fully populated timestamp requirement to
STYLE_GUIDE.md and AGENTS.md.
- Include
migration-police in the required Core CI aggregation so a failure blocks the PR.
Two database migrations can be authored independently with the same placeholder timestamp and both PRs can pass on their own. Once both reach
main, SQLx sees the duplicate version and fresh database migrations stop.What this involves
migration-policeCI job that checks only newly added SQL migration filenames and rejects 14-digit timestamps whose minute-and-second suffix is0000.YYYYMMDDhhmmss_description.sqlformat, so the reason is clear in themigration-policelog.STYLE_GUIDE.mdandAGENTS.md.migration-policein the required Core CI aggregation so a failure blocks the PR.