Files
xamxam/app/migrations/applied/001_add_objet_column.sql
Pontoporeia 4986fa74f4 add structured logging for admin/partage form submissions + migration system
- AppLogger: JSON-line logger in storage/logs/form-submissions.log
- Logs submissions (admin + partage) with IP, UA, thesis ID, author
- Logs errors with context (post keys, share slug)
- Migration runner (app/migrations/run.php) handles schema drift
- 001_add_objet_column.sql fixes production DB missing 'objet' column
- ThesisCreateController::getIdentifier() helper for logging
2026-04-24 23:03:49 +02:00

8 lines
380 B
SQL

-- Add 'objet' column to theses table if it doesn't already exist.
-- Required: the admin form sends 'objet' in POST since commit ~Apr 2024
-- but older production databases may lack the column.
-- SQLite 3.35+ supports ALTER TABLE ADD COLUMN (bundled with PHP 8+).
ALTER TABLE theses ADD COLUMN objet TEXT NOT NULL DEFAULT 'tfe'
CHECK (objet IN ('tfe', 'thèse', 'frart'));