diff --git a/src/db/migrations/index.ts b/src/db/migrations/index.ts index e1540a0..6eab0a5 100644 --- a/src/db/migrations/index.ts +++ b/src/db/migrations/index.ts @@ -490,5 +490,19 @@ export const migrations: Migration[] = [ } } catch {} } + }, + { + version: 19, + name: 'users-last-command-at', + checksum: 'v19-users-last-command-at-2025-10-25', + up: (db: Database) => { + try { + const cols = db.query(`PRAGMA table_info(users)`).all() as any[]; + const hasCol = Array.isArray(cols) && cols.some((c: any) => String(c.name) === 'last_command_at'); + if (!hasCol) { + db.exec(`ALTER TABLE users ADD COLUMN last_command_at TEXT NULL;`); + } + } catch {} + } } ];