Skip to content

Commit 19a5836

Browse files
PR Batch Testerclaude
andcommitted
test(server): update migration guard tests for main's new 057-059
main added migrations 057_ScheduledTaskWebhooks, 058_WebhookRelayDeliveries and 059_McpAppModelContext after this branch was written, so the "full migrate" and "later id would skip V2 migrations" cases now cover ids up to 59, and the "newer build recorded a later V2 migration" case moves its synthetic future id from 57 (now a real migration) to 60. Co-Authored-By: Claude Sonnet 5 <[email protected]>
1 parent f2939a6 commit 19a5836

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎apps/server/src/persistence/Migrations.test.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert, describe, it } from "@effect/vitest";
22
import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient";
33
import * as Effect from "effect/Effect";
44
import * as Exit from "effect/Exit";
5-
import * as SqlClient from "effect/unstable/sql/SqlClient";
5+
import * as SqlClient from "effect/sql/SqlClient";
66

77
import { migrationManifest, runMigrations } from "./Migrations.ts";
88

@@ -62,6 +62,9 @@ describe("runMigrations", () => {
6262
assert.isTrue(Exit.isFailure(exit));
6363
assert.include(String(exit), "55_OrchestrationV2 (recorded: nothing)");
6464
assert.include(String(exit), "56_RemoveRedundantProjectionIndexes (recorded: nothing)");
65+
assert.include(String(exit), "57_ScheduledTaskWebhooks (recorded: nothing)");
66+
assert.include(String(exit), "58_WebhookRelayDeliveries (recorded: nothing)");
67+
assert.include(String(exit), "59_McpAppModelContext (recorded: nothing)");
6568
assert.strictEqual(yield* v2TableCount, 0);
6669
}).pipe(Effect.provide(NodeSqliteClient.layer({ filename: ":memory:" }))),
6770
);
@@ -75,6 +78,9 @@ describe("runMigrations", () => {
7578
assert.deepStrictEqual(yield* runMigrations(), [
7679
[55, "OrchestrationV2"],
7780
[56, "RemoveRedundantProjectionIndexes"],
81+
[57, "ScheduledTaskWebhooks"],
82+
[58, "WebhookRelayDeliveries"],
83+
[59, "McpAppModelContext"],
7884
]);
7985
assert.isAbove(yield* v2TableCount, 0);
8086
}).pipe(Effect.provide(NodeSqliteClient.layer({ filename: ":memory:" }))),
@@ -85,7 +91,7 @@ describe("runMigrations", () => {
8591
const sql = yield* SqlClient.SqlClient;
8692
yield* runMigrations();
8793
yield* sql`
88-
INSERT INTO effect_sql_migrations (migration_id, name) VALUES (57, 'NewerV2Migration')
94+
INSERT INTO effect_sql_migrations (migration_id, name) VALUES (60, 'NewerV2Migration')
8995
`;
9096

9197
assert.deepStrictEqual(yield* runMigrations(), []);

0 commit comments

Comments
 (0)