Maj Section Général
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user