Maj Section Général

This commit is contained in:
2026-06-15 23:03:37 +02:00
parent 01526a5551
commit 032a370e7d
15 changed files with 492 additions and 57 deletions
+14
View File
@@ -1858,4 +1858,18 @@ console.log('[DB] Migrations 2FA OK');
}
// ── Migration : colonnes paramètres généraux dans smtp_config ─────────────
{
const cols = db.prepare("PRAGMA table_info(smtp_config)").all().map(c => c.name);
if (!cols.includes('allow_registration')) {
db.exec("ALTER TABLE smtp_config ADD COLUMN allow_registration INTEGER NOT NULL DEFAULT 1");
console.log('[DB] Colonne smtp_config.allow_registration ajoutée');
}
if (!cols.includes('min_password_length')) {
db.exec("ALTER TABLE smtp_config ADD COLUMN min_password_length INTEGER NOT NULL DEFAULT 8");
console.log('[DB] Colonne smtp_config.min_password_length ajoutée');
}
}
export default db;