diff --git a/images/te_sans_inscription_en_ligne.png b/images/te_sans_inscription_en_ligne.png new file mode 100644 index 0000000..58c5f84 Binary files /dev/null and b/images/te_sans_inscription_en_ligne.png differ diff --git a/sql/MSIN-4482-type-sans-inscription-en-ligne.sql b/sql/MSIN-4482-type-sans-inscription-en-ligne.sql index 790c7fc..87c5609 100644 --- a/sql/MSIN-4482-type-sans-inscription-en-ligne.sql +++ b/sql/MSIN-4482-type-sans-inscription-en-ligne.sql @@ -4,13 +4,14 @@ -- -- Table : inscriptions_types_evenements -- Lien : inscriptions_evenements.te_id +-- Icône : images/te_sans_inscription_en_ligne.png (pas le coureur — écran + interdit) -- 1) Créer le type (idempotent) INSERT INTO inscriptions_types_evenements (te_nom_fr, te_nom_en, te_icone, te_actif) SELECT 'Sans inscription en ligne', 'No online registration', - '', + 'te_sans_inscription_en_ligne.png', 1 FROM (SELECT 1 AS _x) AS _seed WHERE NOT EXISTS ( @@ -19,12 +20,18 @@ WHERE NOT EXISTS ( WHERE te_nom_fr = 'Sans inscription en ligne' ); +-- 1b) Si le type existe déjà sans icône (ou à corriger) — petit UPDATE, safe +UPDATE inscriptions_types_evenements +SET te_icone = 'te_sans_inscription_en_ligne.png' +WHERE te_nom_fr = 'Sans inscription en ligne' + AND IFNULL(te_icone, '') <> 'te_sans_inscription_en_ligne.png'; + -- 2) Vérification -SELECT te_id, te_nom_fr, te_nom_en, te_actif +SELECT te_id, te_nom_fr, te_nom_en, te_icone, te_actif FROM inscriptions_types_evenements WHERE te_nom_fr = 'Sans inscription en ligne'; --- 3) Rattacher l'événement de test Échappée (1284) — adapter si autre eve_id +-- 3) Rattacher l'événement de test (adapter eve_id si besoin) UPDATE inscriptions_evenements SET te_id = ( SELECT te_id FROM inscriptions_types_evenements