mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +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
|
||||
);
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user