Automate DB migrations + fix audit trigger + drop forced password change

- scripts/run-migrations.mjs: auto-applies unapplied .sql files on
  npm run dev/setup via psql, tracks state in _migrations table
- 020_fixes.sql: sets password_change_required=FALSE for all users,
  fixes audit_password_change UUID cast, re-enables trigger
- package.json: hook migrations into dev:precheck
- setup.mjs: hook into npm run setup
- run_all.sql: add 020_fixes.sql to migration order
This commit is contained in:
2026-07-01 13:07:15 +02:00
parent b2bb6d94f5
commit 37af1febcc
5 changed files with 231 additions and 3 deletions
+4
View File
@@ -75,5 +75,9 @@ BEGIN;
\echo '=== Running 019_allow_null_start_time.sql (Allow Null Start Time) ==='
\i 019_allow_null_start_time.sql
\echo '=== Running 020_fixes.sql (password_change_required + audit trigger fix) ==='
\i 020_fixes.sql
\echo '=== Migration Complete ==='
COMMIT;