4d295ef062
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.
17 lines
840 B
SQL
17 lines
840 B
SQL
-- 0002_admin_password.sql (no-op)
|
|
--
|
|
-- This migration slot is preserved for historical DB compatibility.
|
|
-- The original content added a `password_hash` column to a legacy `users`
|
|
-- table used by the old Auth.js Credentials provider. That table no longer
|
|
-- exists — auth moved to Neon Auth (Better Auth), which manages its own
|
|
-- `neon_auth.user` schema. See CLAUDE.md "Authentication & Authorization".
|
|
--
|
|
-- Production DBs that ran the original migration already have this filename
|
|
-- recorded in `_migrations` and will skip it. Fresh DBs would otherwise
|
|
-- fail on `ALTER TABLE users`; this no-op keeps the apply path clean while
|
|
-- preserving the migration numbering (0003_*.sql onward is unaffected).
|
|
--
|
|
-- Do not reintroduce an `ALTER TABLE users` here — the table does not exist
|
|
-- and Neon Auth owns user identity.
|
|
|
|
SELECT 1; |