import { assert, it } from "@effect/vitest";import * as Effect from "effect/Effect";import * as Layer from "effect/Layer";import * as SqlClient from "effect/unstable/sql/SqlClient"; import { runMigrations } from "../Migrations.ts";import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient"; const layer = it.layer(Layer.mergeAll(NodeSqliteClient.layerMemory())); layer("042_ProjectionThreadLinkedPullRequest", (it) => { it.effect("adds the linked pull request column", () => Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; yield* runMigrations({ toMigrationInclusive: 41 }); yield* runMigrations({ toMigrationInclusive: 42 }); const columns = yield* sql<{ readonly name: string }>` PRAGMA table_info(projection_threads) `; assert.ok(columns.some((column) => column.name === "linked_pull_request_json")); }), );});
import { assert, it } from "@effect/vitest";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as SqlClient from "effect/unstable/sql/SqlClient";
import { runMigrations } from "../Migrations.ts";
import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient";
const layer = it.layer(Layer.mergeAll(NodeSqliteClient.layerMemory()));
layer("042_ProjectionThreadLinkedPullRequest", (it) => {
it.effect("adds the linked pull request column", () =>
Effect.gen(function* () {
const sql = yield* SqlClient.SqlClient;
yield* runMigrations({ toMigrationInclusive: 41 });
yield* runMigrations({ toMigrationInclusive: 42 });
const columns = yield* sql<{ readonly name: string }>`
PRAGMA table_info(projection_threads)
`;
assert.ok(columns.some((column) => column.name === "linked_pull_request_json"));
}),
);
});