mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
schema: validate against new TFE field spec
- add exemplaire_baiu, exemplaire_erg, cc4r, remarks; - add is_ulb to jury; - split jury_lecteurs into interne/externe in view; - refactor admin edit form with backoffice fields; - update public fiche to show promoteur ULB and split lecteurs
This commit is contained in:
18
app/migrations/applied/009_admin_audit_log.sql
Normal file
18
app/migrations/applied/009_admin_audit_log.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- Migration 009: create admin_audit_log table
|
||||
-- Mirrors every admin action logged to /var/log/xamxam.log.
|
||||
-- Best-effort: application never fails if this table is absent, but the
|
||||
-- table must exist for AdminLogger::insertDb() to write audit records.
|
||||
CREATE TABLE IF NOT EXISTS admin_audit_log (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
ip TEXT NOT NULL,
|
||||
user_agent TEXT,
|
||||
resource TEXT NOT NULL,
|
||||
action TEXT NOT NULL,
|
||||
status TEXT NOT NULL,
|
||||
context TEXT
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_admin_audit_log_created_at ON admin_audit_log(created_at);
|
||||
CREATE INDEX IF NOT EXISTS idx_admin_audit_log_resource ON admin_audit_log(resource);
|
||||
CREATE INDEX IF NOT EXISTS idx_admin_audit_log_action ON admin_audit_log(action);
|
||||
Reference in New Issue
Block a user