From 53672c468bde5fcc5cbc250a258c0be537ad22fa Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 2 Sep 2026 06:46:36 +0800 Subject: [PATCH] fix(ql3): make completion fixture migration-ready --- ...ql3-local-alpha-upgrade-readiness-fixture.cjs | 4 ++-- ...ql3LocalAlphaUpgradeReadinessFixture.test.cjs | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/ql3-local-alpha-upgrade-readiness-fixture.cjs b/scripts/ql3-local-alpha-upgrade-readiness-fixture.cjs index 3956740f..ab079816 100644 --- a/scripts/ql3-local-alpha-upgrade-readiness-fixture.cjs +++ b/scripts/ql3-local-alpha-upgrade-readiness-fixture.cjs @@ -119,9 +119,9 @@ function createLegacyDatabase(databasePath, shape) { '0 0 * * *', 1, 0, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP ); INSERT INTO "Envs" ( - id, name, value, status, position, createdAt, updatedAt + id, name, value, status, position, isPinned, createdAt, updatedAt ) VALUES ( - 1, 'ALPHA_READINESS_VALUE', 'synthetic-only', 0, 100, + 1, 'ALPHA_READINESS_VALUE', 'synthetic-only', 0, 100, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP ); `); diff --git a/test/back/ql3LocalAlphaUpgradeReadinessFixture.test.cjs b/test/back/ql3LocalAlphaUpgradeReadinessFixture.test.cjs index d468ee2a..78b77cd5 100644 --- a/test/back/ql3LocalAlphaUpgradeReadinessFixture.test.cjs +++ b/test/back/ql3LocalAlphaUpgradeReadinessFixture.test.cjs @@ -43,6 +43,22 @@ test('creates one private production-shaped QingLong 2.x readiness fixture', (t) 'Subscriptions', 'sqlite_sequence', ]); + assert.deepEqual( + database + .prepare( + 'SELECT name, status, position, isPinned FROM Envs ORDER BY id', + ) + .all() + .map((row) => ({ ...row })), + [ + { + name: 'ALPHA_READINESS_VALUE', + status: 0, + position: 100, + isPinned: 0, + }, + ], + ); } finally { database.close(); }