@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 17 lines 466 Bytes
Raw
1 import * as Effect from "effect/Effect";
2 import * as SqlClient from "effect/sql/SqlClient";
3
4 export default Effect.gen(function* () {
5 const sql = yield* SqlClient.SqlClient;
6
7 const sessionColumns = yield* sql<{ readonly name: string }>`
8 PRAGMA table_info(auth_sessions)
9 `;
10
11 if (!sessionColumns.some((column) => column.name === "last_connected_at")) {
12 yield* sql`
13 ALTER TABLE auth_sessions
14 ADD COLUMN last_connected_at TEXT
15 `;
16 }
17 });