32 lines
687 B
SQL
32 lines
687 B
SQL
-- Migration: Ajouter le type GRAND_PRIZE pour le gros lot du tirage final
|
|
-- Date: 2025-11-14
|
|
|
|
-- Ajouter le type GRAND_PRIZE à l'enum prize_type
|
|
ALTER TYPE prize_type ADD VALUE IF NOT EXISTS 'GRAND_PRIZE';
|
|
|
|
-- Créer le gros lot "An de thé" (360€)
|
|
INSERT INTO prizes (
|
|
type,
|
|
name,
|
|
description,
|
|
value,
|
|
stock,
|
|
probability,
|
|
is_active
|
|
) VALUES (
|
|
'GRAND_PRIZE',
|
|
'An de thé',
|
|
'Gros lot du tirage final - Un an de thé d''exception',
|
|
'360.00',
|
|
1,
|
|
0,
|
|
TRUE
|
|
)
|
|
ON CONFLICT (name) DO UPDATE SET
|
|
type = 'GRAND_PRIZE',
|
|
description = 'Gros lot du tirage final - Un an de thé d''exception',
|
|
value = '360.00',
|
|
stock = 1,
|
|
probability = 0,
|
|
is_active = TRUE;
|