mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-22 19:29:13 +08:00
fix(ql3): make completion fixture migration-ready
This commit is contained in:
@@ -119,9 +119,9 @@ function createLegacyDatabase(databasePath, shape) {
|
|||||||
'0 0 * * *', 1, 0, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
|
'0 0 * * *', 1, 0, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
INSERT INTO "Envs" (
|
INSERT INTO "Envs" (
|
||||||
id, name, value, status, position, createdAt, updatedAt
|
id, name, value, status, position, isPinned, createdAt, updatedAt
|
||||||
) VALUES (
|
) VALUES (
|
||||||
1, 'ALPHA_READINESS_VALUE', 'synthetic-only', 0, 100,
|
1, 'ALPHA_READINESS_VALUE', 'synthetic-only', 0, 100, 0,
|
||||||
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
|
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
`);
|
`);
|
||||||
|
|||||||
@@ -43,6 +43,22 @@ test('creates one private production-shaped QingLong 2.x readiness fixture', (t)
|
|||||||
'Subscriptions',
|
'Subscriptions',
|
||||||
'sqlite_sequence',
|
'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 {
|
} finally {
|
||||||
database.close();
|
database.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user