Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
16 lines
481 B
TypeScript
16 lines
481 B
TypeScript
import * as Effect from "effect/Effect";
|
|
import * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
|
|
export default Effect.gen(function* () {
|
|
const sql = yield* SqlClient.SqlClient;
|
|
const columns = yield* sql<{ readonly name: string }>`
|
|
PRAGMA table_info(projection_threads)
|
|
`;
|
|
if (!columns.some((column) => column.name === "auto_settle_disabled_at")) {
|
|
yield* sql`
|
|
ALTER TABLE projection_threads
|
|
ADD COLUMN auto_settle_disabled_at TEXT
|
|
`;
|
|
}
|
|
});
|