From 9eca1ac8c759dd1e724d9cdf47947846d1c8da2c Mon Sep 17 00:00:00 2001 From: Olivier Date: Mon, 15 Jun 2026 21:40:25 +0200 Subject: [PATCH] Fix --- backend/src/db/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/db/index.js b/backend/src/db/index.js index 84a56fb..3f31fcd 100644 --- a/backend/src/db/index.js +++ b/backend/src/db/index.js @@ -1822,4 +1822,14 @@ console.log('[DB] Migrations 2FA OK'); } +// ── Migration : status sur users ───────────────────────────────────────────── +{ + const userCols = db.prepare('PRAGMA table_info(users)').all().map(c => c.name); + if (!userCols.includes('status')) { + db.exec("ALTER TABLE users ADD COLUMN status TEXT NOT NULL DEFAULT 'active'"); + console.log('[DB] users.status ajouté'); + } +} + + export default db;