test: cover memory tags schema
This commit is contained in:
parent
5c32d91124
commit
95b00d8963
1 changed files with 10 additions and 0 deletions
|
|
@ -275,3 +275,13 @@ test("openDatabase_migrates_v35_gate_cost_usd_to_micro_usd", () => {
|
|||
assert.equal(row.cost_usd, 0.123456);
|
||||
assert.equal(row.cost_micro_usd, 123_456);
|
||||
});
|
||||
|
||||
test("openDatabase_memories_table_has_tags_column", () => {
|
||||
assert.equal(openDatabase(":memory:"), true);
|
||||
const db = getDatabase();
|
||||
const columns = db.prepare("PRAGMA table_info(memories)").all();
|
||||
const tagsCol = columns.find((row) => row.name === "tags");
|
||||
assert.ok(tagsCol, "memories table should have tags column");
|
||||
assert.equal(tagsCol.type, "TEXT");
|
||||
assert.equal(tagsCol.dflt_value, "'[]'");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue