Commit Graph
8 Commits
Author SHA1 Message Date
naeel 6025d84959 fix: add ALTER TABLE migration for impersonated_by column 2026-06-11 16:20:52 +04:00
naeel 7758d70dcf feat: double audit — impersonated_by in audit_log
- db.js: add impersonated_by column to audit_log
- queries.js: logAudit accepts impersonatedBy, all CRUD pass it
- api/routes/entries.js: pass req.user.originalUserEmail as impersonatedBy
- При имперсонации: created_by=импактируемый, impersonated_by=админ
2026-06-11 16:10:41 +04:00
naeel 02859d6a7a fix: replace regex constraint with LIKE '%/%' for PG compat
- constraint CHECK (value_cidr LIKE '%/%') instead of regex
- regex broke on managed PG with standard_conforming_strings=off
- ALTER TABLE adds constraint on existing tables
2026-06-10 11:51:08 +04:00
naeel f40bcb84fd feat: ensureSchema — приложение само создаёт таблицы при старте
- db.js: ensureSchema() = CREATE TABLE IF NOT EXISTS для всех таблиц
- server.js: вызов ensureSchema() после коннекта к БД
- Больше не нужен ручной psql -f sql/schema.sql
2026-06-09 19:55:07 +04:00
naeel b0e43f981b Revert "feat: auto-migration on startup (ensureSchema)"
This reverts commit dce2368712.
2026-06-09 19:48:43 +04:00
naeel dce2368712 feat: auto-migration on startup (ensureSchema)
- db.js: ensureSchema() creates tables if not exist
- server.js: calls ensureSchema() after DB connection
- No manual SQL needed for deployment
2026-06-09 19:46:19 +04:00
naeel 9fd808bc1f chore: DB defaults for managed platform, reduce required env vars
- db.js: DB_HOST default postgresqlk8s-master, DB_NAME default ipwhitelist, DB_USER default super
- server.js: fail-fast for DB_PASS in production (instead of IAM_API_URL)
- After this change: only DB_PASS is required for mock mode
2026-06-09 19:20:29 +04:00
naeel 814625ef57 feat: каркас Express + pg, health check 2026-05-29 21:56:20 +03:00