📌 Description
Drizzle migrations under the folder configured in drizzle.config.ts should follow a consistent timestamp-prefixed naming convention so ordering is unambiguous; nothing currently enforces this, so a manually-added or renamed migration file could silently break apply order.
🧩 Requirements and context
- Add a lint/check script that verifies every migration filename in the configured migrations folder matches the expected timestamp-prefixed pattern.
- Run the check in CI (
.github/workflows/ci.yml) so a violation fails the build, not just local dev.
- Document the naming convention near the migrations folder or in
README.md.
🛠️ Suggested execution
- Write a small script that reads the migrations directory referenced by
drizzle.config.ts and validates filenames against the pattern.
- Wire the script into
package.json scripts and into CI.
- Add a test with a deliberately misnamed fixture filename asserting the check fails.
✅ Acceptance criteria
🔒 Security notes
None — this is a correctness/ordering safeguard for migrations, not a security control.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
Drizzle migrations under the folder configured in
drizzle.config.tsshould follow a consistent timestamp-prefixed naming convention so ordering is unambiguous; nothing currently enforces this, so a manually-added or renamed migration file could silently break apply order.🧩 Requirements and context
.github/workflows/ci.yml) so a violation fails the build, not just local dev.README.md.🛠️ Suggested execution
drizzle.config.tsand validates filenames against the pattern.package.jsonscripts and into CI.✅ Acceptance criteria
🔒 Security notes
None — this is a correctness/ordering safeguard for migrations, not a security control.
📋 Guidelines