fix(ql3): make completion fixture migration-ready

This commit is contained in:
whyour
2026-09-02 06:46:36 +08:00
parent 3df73261ab
commit 53672c468b
2 changed files with 18 additions and 2 deletions
@@ -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
);
`);
@@ -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();
}