Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Commit 2774b54

Browse files
committed
PERF: Fix schema migration test expectation
- Align identity-column migration tests with the current schema version so PR merge commits do not fail when later migrations exist. Testing: Focused session identity migration test and desktop typecheck passed. Risks: Low; test-only assertion update.
1 parent 998e223 commit 2774b54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/desktop/test/session-identity-columns.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function cleanup(db: ReturnType<typeof openAgentDatabase>, dir: string) {
3131
test("schema v6 migration adds user_id and organization_id columns to sessions", () => {
3232
const { db, dir } = makeTmpDb();
3333
try {
34-
assert.equal(CURRENT_SCHEMA_VERSION, 6, "schema version bumped to 6");
34+
assert.ok(CURRENT_SCHEMA_VERSION >= 6, "schema includes the v6 identity-column migration");
3535

3636
// Verify columns exist by inserting a row with user_id/organization_id
3737
db.connection.exec(`
@@ -270,7 +270,7 @@ test("v5 → v6 upgrade preserves existing session data", () => {
270270
const db = openAgentDatabase(dbPath);
271271
try {
272272
const version = (db.connection.prepare("PRAGMA user_version").get() as { user_version: number }).user_version;
273-
assert.equal(version, 6, "schema upgraded to v6");
273+
assert.equal(version, CURRENT_SCHEMA_VERSION, "schema upgraded to the current version");
274274

275275
// Verify pre-existing session still has all its data
276276
const session = db.sessions.getById("pre-upgrade");

0 commit comments

Comments
 (0)