mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
feat(db): add the v1.43 schema and drop the readable location columns
Migrations 0402 to 0410: AI usage levels, biomarker aliases and merges, medication ingredients (with the supplement label run kind), life circumstance fact kinds, AI sections and AUDIT-C, Dawarich context, the pulse day-mean method, intraday hour buckets, the readable location drop and five relation link tables. Every new column carries its reader or a pending-consumer marker. 0409 refuses to run while any home, location period or stored day still holds a readable location, and names the counts. Locations are read from the sealed copy only; the encryption backfill no longer handles them, and the demo seed writes sealed locations only. The new tables are backed up and wiped, the new sealed columns are in the rotation registry with labels of their own, the AI usage level and the life-circumstance confirmations travel with the backup, and the wellbeing score reads the mental-health screeners only.
This commit is contained in:
1 parent
0b64b80343
commit
6e72de1c35
45 files changed
+1386
-917
No files matched your search
@@ -43,13 +43,7 @@ const EXCLUDED: Record<string, string> = {
|
||||
};
|
||||
|
||||
/** Columns written through the location helper rather than `row.<column>`. */
|
||||
const LOCATION_COLUMNS = new Set([
|
||||
"lat",
|
||||
"lon",
|
||||
"locationLabel",
|
||||
"label",
|
||||
"locationEncrypted",
|
||||
]);
|
||||
const LOCATION_COLUMNS = new Set(["locationEncrypted"]);
|
||||
|
||||
function block(text: string, start: string, end = "\n}"): string {
|
||||
const from = text.indexOf(start);
|
||||
@@ -95,9 +89,10 @@ describe.each([
|
||||
const selected = selectKeys(selectName);
|
||||
|
||||
it("parses both ends into a plausible shape", () => {
|
||||
expect(columns.length).toBeGreaterThan(8);
|
||||
// A period is seven columns since v1.43 (the readable location dropped).
|
||||
expect(columns.length).toBeGreaterThan(6);
|
||||
expect(columns).toContain("locationEncrypted");
|
||||
expect(selected.length).toBeGreaterThan(5);
|
||||
expect(selected.length).toBeGreaterThan(4);
|
||||
});
|
||||
|
||||
it("the backup select covers every column", () => {
|
||||
|
||||
Reference in new issue
Block a user