Files
t3code/apps/server/src/persistence/Migrations/023_ProjectionThreadShellSummary.ts
T
f7fa62aaf9 Add shell snapshot queries for orchestration state (#1973)
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
Co-authored-by: codex <[email protected]>
2026-04-13 08:50:50 -07:00

27 lines
807 B
TypeScript

import * as SqlClient from "effect/unstable/sql/SqlClient";
import * as Effect from "effect/Effect";
export default Effect.gen(function* () {
const sql = yield* SqlClient.SqlClient;
yield* sql`
ALTER TABLE projection_threads
ADD COLUMN latest_user_message_at TEXT
`.pipe(Effect.catch(() => Effect.void));
yield* sql`
ALTER TABLE projection_threads
ADD COLUMN pending_approval_count INTEGER NOT NULL DEFAULT 0
`.pipe(Effect.catch(() => Effect.void));
yield* sql`
ALTER TABLE projection_threads
ADD COLUMN pending_user_input_count INTEGER NOT NULL DEFAULT 0
`.pipe(Effect.catch(() => Effect.void));
yield* sql`
ALTER TABLE projection_threads
ADD COLUMN has_actionable_proposed_plan INTEGER NOT NULL DEFAULT 0
`.pipe(Effect.catch(() => Effect.void));
});