chore: fix latest build
Backend - Build & Lint / build (push) Has been cancelled

This commit is contained in:
2026-06-29 18:56:00 +02:00
parent 9fcc77307f
commit 781212f706
5 changed files with 24 additions and 15 deletions
+6
View File
@@ -294,6 +294,11 @@ func InitDB() *Database {
log.Fatalf("❌ Erreur migration contacts: %v", err)
}
// Migration: clé RustFS pour les médias (stockage objet)
if _, err = database.Exec(`ALTER TABLE media ADD COLUMN IF NOT EXISTS key TEXT NOT NULL DEFAULT ''`); err != nil {
log.Fatalf("❌ Erreur migration media.key: %v", err)
}
// Lancer le nettoyage périodique des tokens expirés
go database.cleanExpiredTokensPeriodically()
@@ -399,6 +404,7 @@ func (db *Database) createTables() error {
product_id INTEGER NOT NULL REFERENCES products(id) ON DELETE CASCADE,
url TEXT NOT NULL,
type VARCHAR(50) NOT NULL,
key TEXT NOT NULL DEFAULT '',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);`,