add admin audit log (11), hide stacktraces via NODE_ENV=production (13), validate spam_interval_min>=1 (16)

This commit is contained in:
dev
2026-09-08 12:12:29 +03:00
parent 441bdfe0fe
commit e0cec0f943
7 changed files with 196 additions and 5 deletions
+10
View File
@@ -71,3 +71,13 @@ CREATE TABLE IF NOT EXISTS project_files (
created_at TIMESTAMPTZ DEFAULT now(),
detached_at TIMESTAMPTZ
);
CREATE TABLE IF NOT EXISTS audit_log (
id SERIAL PRIMARY KEY,
action VARCHAR(100) NOT NULL,
target JSONB,
ip VARCHAR(45),
created_at TIMESTAMPTZ DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_audit_log_created_at ON audit_log(created_at DESC);