- Add `thread.runtime-mode.set` -> `thread.runtime-mode-set` flow in decider/reactors/projectors - Persist runtime mode on thread/session projections with new DB migrations - Update provider and Codex integration tests to verify thread continuity across mode changes Co-authored-by: codex <[email protected]>
18 lines
426 B
TypeScript
18 lines
426 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;
|
|
|
|
yield* sql`
|
|
ALTER TABLE projection_threads
|
|
ADD COLUMN runtime_mode TEXT NOT NULL DEFAULT 'full-access'
|
|
`;
|
|
|
|
yield* sql`
|
|
UPDATE projection_threads
|
|
SET runtime_mode = 'full-access'
|
|
WHERE runtime_mode IS NULL
|
|
`;
|
|
});
|