adeo-maturity-tool/server/migrations/002_import_log.sql
Phil Dore b97889a9d9 Add activity log, multilingual support (ES/PT/IT/PL), and QA score column fix
- Activity log: import_log DB table, GET /activity endpoint, collapsible
  panel in Update Data tab showing who changed what score and when
- Sync logging: Box syncs now also write to import_log with before/after scores
- Multilingual: ES, PT, IT, PL UI strings in i18n/ui.js; content translations
  (pillars, scoring labels, About tab) in clients/adeo/config.json; language
  switcher upgraded from EN/FR toggle to 6-language dropdown
- cfg() and pillarDisplayName() generalised to support any language (not just FR)
- import_file.py: reads 'Final QA ...' column first (falls back to Score) so
  QA-updated XLSX files produce the correct overall score on import
- convert_data.py/docker-compose: use ADEO_DATA_ROOT env var for Box path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 13:23:22 +01:00

13 lines
479 B
SQL

CREATE TABLE IF NOT EXISTS import_log (
id SERIAL PRIMARY KEY,
client_id TEXT NOT NULL,
entity_id TEXT NOT NULL,
user_email TEXT NOT NULL,
action TEXT NOT NULL CHECK (action IN ('import', 'sync')),
prev_score NUMERIC(5,2),
new_score NUMERIC(5,2),
filename TEXT,
logged_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS import_log_client_logged ON import_log (client_id, logged_at DESC);