chore: fix updates

This commit is contained in:
2026-03-01 17:30:08 +01:00
parent 2fad63c28d
commit bb8dee3406
9 changed files with 226 additions and 19 deletions
+5
View File
@@ -71,6 +71,11 @@ func InitDB() *Database {
log.Println("✅ Tables créées avec succès")
// Migration: ajouter colonne must_change_password si elle n'existe pas
if _, err = database.Exec(`ALTER TABLE clients ADD COLUMN IF NOT EXISTS must_change_password BOOLEAN NOT NULL DEFAULT TRUE`); err != nil {
log.Fatalf("❌ Erreur migration must_change_password: %v", err)
}
// Lancer le nettoyage périodique des tokens expirés
go database.cleanExpiredTokensPeriodically()