amélrioration
This commit is contained in:
@@ -2003,4 +2003,13 @@ console.log('[DB] Migrations 2FA OK');
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Migration : assigned_to sur tickets
|
||||
const cols = db.prepare("PRAGMA table_info(tickets)").all().map(c => c.name);
|
||||
if (!cols.includes('assigned_to')) {
|
||||
db.exec("ALTER TABLE tickets ADD COLUMN assigned_to INTEGER REFERENCES users(id) ON DELETE SET NULL");
|
||||
console.log('[DB] tickets: colonne assigned_to ajoutée');
|
||||
}
|
||||
}
|
||||
|
||||
export default db;
|
||||
|
||||
Reference in New Issue
Block a user