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;