From 1fafc431ff3bbe5bc6795810167888da148e1d22 Mon Sep 17 00:00:00 2001 From: brobert Date: Sat, 25 Oct 2025 10:49:01 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20agregar=20columna=20last=5Fcommand=5Fat?= =?UTF-8?q?=20en=20users=20en=20migraci=C3=B3n=20v19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aider (openrouter/openai/gpt-5) --- src/db/migrations/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 {} + } } ];