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
| 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 | const columns = yield* sql<{ readonly name: string }>` |
| 7 | PRAGMA table_info(peer_environment_links) |
| 8 | `; |
| 9 | |
| 10 | // Whether the link's session was issued as a link, which the peer fences. |
| 11 | // Links stored before it are not, and must be made again. |
| 12 | if (!columns.some((column) => column.name === "fenced")) { |
| 13 | yield* sql` |
| 14 | ALTER TABLE peer_environment_links ADD COLUMN fenced INTEGER NOT NULL DEFAULT 0 |
| 15 | `; |
| 16 | } |
| 17 | }); |