@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 11 lines 433 Bytes
Raw
1 import * as Effect from "effect/Effect";
2 import * as SqlClient from "effect/sql/SqlClient";
3
4 /** Keyset pagination needs both requested_at and turn_id indexed to avoid sorting all turns before LIMIT. */
5 export default Effect.gen(function* () {
6 const sql = yield* SqlClient.SqlClient;
7 yield* sql`
8 CREATE INDEX IF NOT EXISTS idx_projection_turns_thread_keyset
9 ON projection_turns(thread_id, requested_at, turn_id)
10 `;
11 });