chore: fix

This commit is contained in:
2026-03-14 15:28:40 +01:00
parent 9d52f3193a
commit 0043646cff
10 changed files with 156 additions and 77 deletions
+5
View File
@@ -161,6 +161,11 @@ func InitDB() *Database {
log.Fatalf("❌ Erreur migration commandes.referral_used: %v", err)
}
// Migration: points extra pour les pools de points supplémentaires (pool[2+])
if _, err = database.Exec(`ALTER TABLE clients ADD COLUMN IF NOT EXISTS points_extra JSONB NOT NULL DEFAULT '{}'::jsonb`); err != nil {
log.Fatalf("❌ Erreur migration clients.points_extra: %v", err)
}
// Lancer le nettoyage périodique des tokens expirés
go database.cleanExpiredTokensPeriodically()