chore(db): no-op legacy migration 0002; gitignore QA audit scratch

The 0002_admin_password.sql migration referenced a 'users' table that
no longer exists — auth moved from Auth.js Credentials to Neon Auth
(Better Auth), which owns its own neon_auth.user schema.

The migration was being recorded in _migrations to skip, but a fresh DB
or new environment would fail with 'relation users does not exist'.
scripts/migrate.js already had an ensureTracked() repair path that
auto-marks 0002 applied when the users.password_hash column exists,
so legacy DBs still work. For fresh DBs, this rewrite replaces the
broken ALTER with a no-op SELECT 1, preserving the 0002 slot so
0003_*.sql onward numbering is unaffected.

Also add .gitignore entries for local-only QA artifacts:
- db/migrations/0000_qa_*.sql (Neon Auth stub for local audit)
- db/seeds/2026-qa-*.sql      (production-scale audit seed)
- docs/qa/                    (local audit plan/inventory/bugs)

These files should never apply to production (the migration stub
would conflict with real neon_auth.user; the seed is 1000s of rows).
Tracking progress in /tmp/refactor-routecomm.md.
This commit is contained in:
Nora
2026-06-25 21:45:55 -06:00
parent 880c52227a
commit 4d295ef062
2 changed files with 19 additions and 16 deletions
+6
View File
@@ -49,3 +49,9 @@ playwright-report/
public/videos/tuxedo-hero.mp4
.neon
.worktrees/
# Local QA audit scratch — never applies to prod
# (Neon Auth stub, scale seed, audit docs created by local audit runs)
db/migrations/0000_qa_*.sql
db/seeds/2026-qa-*.sql
docs/qa/