Skip to content

Reject Placeholder Database Migration Timestamps #4431

Description

@chet

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions