Update SQL for 'Sans inscription en ligne' event type to include icon and ensure correct updates. Add logic to set icon if missing and adjust event attachment query for flexibility. Increment version code.
This commit is contained in:
BIN
images/te_sans_inscription_en_ligne.png
Normal file
BIN
images/te_sans_inscription_en_ligne.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 821 KiB |
@ -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
|
||||
|
||||
Reference in New Issue
Block a user