feat(#214): migration Agenda B0 — lots, soft-cancel, prefs
Ajoute agenda_lots versionnés, colonnes soft-cancel / heure / id_lot sur evenements_agenda, soft-cancel + remonte_le sur card_instances, revision_lot sur card_responses, preferences JSONB utilisateurs. Met à jour BDD.sql, ENUMS, verify.sql et entités TypeORM. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -79,12 +79,42 @@ LEFT JOIN avenants_contrats a ON a.id_contrat = c.id
|
||||
GROUP BY c.id, c.id_dossier, c.statut
|
||||
ORDER BY c.cree_le DESC;
|
||||
|
||||
\echo '=== 9) Absences_garde (30 derniers jours) ====================='
|
||||
SELECT ag.id, ag.type, ag.id_placement, ag.date_debut, ag.date_fin, ag.statut, ag.expire_at
|
||||
\echo '=== 9) Événements agenda (30 derniers jours) ==================='
|
||||
SELECT ag.id, ag.type, ag.id_placement, ag.date_debut, ag.date_fin, ag.statut,
|
||||
ag.id_lot, ag.heure, ag.verrouille_le, ag.expire_at
|
||||
FROM evenements_agenda ag
|
||||
WHERE ag.date_debut >= (NOW()::date - INTERVAL '30 days')
|
||||
ORDER BY ag.date_debut DESC;
|
||||
|
||||
\echo '=== 9b) Agenda B0 (#214) — schéma lots / soft-cancel / prefs ==='
|
||||
SELECT COUNT(*) AS nb_lots FROM agenda_lots;
|
||||
SELECT column_name
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'evenements_agenda'
|
||||
AND column_name IN ('id_lot', 'heure', 'verrouille_le', 'refuse_le', 'annule_le', 'annule_par')
|
||||
ORDER BY column_name;
|
||||
SELECT column_name
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'card_instances'
|
||||
AND column_name IN ('id_lot', 'annule_le', 'annule_par', 'remonte_le')
|
||||
ORDER BY column_name;
|
||||
SELECT column_name
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'card_responses' AND column_name = 'revision_lot';
|
||||
SELECT column_name
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'utilisateurs' AND column_name = 'preferences';
|
||||
SELECT enumlabel
|
||||
FROM pg_enum e
|
||||
JOIN pg_type t ON t.oid = e.enumtypid
|
||||
WHERE t.typname IN (
|
||||
'statut_evenement_agenda_type',
|
||||
'agenda_lot_statut_type',
|
||||
'card_instance_statut_type',
|
||||
'card_operation_type'
|
||||
)
|
||||
ORDER BY t.typname, e.enumsortorder;
|
||||
|
||||
\echo '=== 10) Uploads & notifications récentes ======================='
|
||||
SELECT u.courriel, up.fichier_url, up.type_fichier, up.cree_le
|
||||
FROM uploads up
|
||||
|
||||
Reference in New Issue
Block a user