fix(db): use DOUBLE PRECISION for position and progress columns

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 03:01:31 +01:00
co-authored by Claude Opus 5.5
parent f061e36092
commit ea18f18b4f
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -14,7 +14,9 @@ forEachDb("progress upsert keeps one row", async (db) => {
expect(got.l1.positionSeconds).toBeNull();
expect(got.l2.positionSeconds).toBe(3);
expect(typeof got.l1.updatedAt).toBe("string");
expect((await db.sql`SELECT COUNT(*) AS n FROM progress WHERE user_id = 'u'`)[0].n.toString()).toBe("2");
await p.set("u", "c", "l3", "in-progress", 1234.567);
expect((await p.get("u", "c")).l3.positionSeconds).toBe(1234.567);
expect((await db.sql`SELECT COUNT(*) AS n FROM progress WHERE user_id = 'u'`)[0].n.toString()).toBe("3");
});
forEachDb("notes order puts slide page 2 before page 10", async (db) => {