1import * as Effect from "effect/Effect";
2import * as SqlClient from "effect/sql/SqlClient";
3
4// Schema setup composed by migration 055.
5export default Effect.gen(function* () {
6 const sql = yield* SqlClient.SqlClient;
7 yield* sql`
8 CREATE TABLE IF NOT EXISTS orchestration_v2_thread_launch_workflows (
9 command_id TEXT PRIMARY KEY,
10 thread_id TEXT NOT NULL,
11 project_id TEXT NOT NULL,
12 status TEXT NOT NULL,
13 title TEXT NOT NULL,
14 worktree_path TEXT,
15 branch TEXT,
16 setup_committed INTEGER NOT NULL DEFAULT 0,
17 thread_committed INTEGER NOT NULL DEFAULT 0,
18 message_committed INTEGER NOT NULL DEFAULT 0,
19 last_error TEXT,
20 created_at TEXT NOT NULL,
21 updated_at TEXT NOT NULL
22 )
23 `;
24});