* ci: guard against duplicate migration numbers
Two migration files sharing the same numeric prefix have an ambiguous
apply order under node-pg-migrate and can diverge across environments.
Add a checker (backend/scripts/check-migration-duplicates.js) wired into:
- a new GitHub Actions workflow (.github/workflows/check-migrations.yml)
running on PRs and pushes to main
- a vitest unit test (tests/unit/migration-duplicate-numbers.test.ts)
- an npm script (migrate:check-duplicates)
The pre-existing duplicates 033 and 047 are grandfathered via an
allowlist; any new collision fails CI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: declare node globals to satisfy eslint no-undef
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>