mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
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
This commit is contained in:
7
app/migrations/applied/001_add_objet_column.sql
Normal file
7
app/migrations/applied/001_add_objet_column.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- 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'));
|
||||
Reference in New Issue
Block a user