mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 11:57:08 +01:00
Sync: signed in, off by default. Each device stores only what it observed; the server keeps each device's records apart (progress_devices) and pages show the sum, so nothing is counted twice however often devices sync. Model: sum; history: union; streak: newest record, best of all; saved words: the newest list is adopted, so deletions stay deleted. Server-side, every value goes through the browser's own decoder and is stored normalised. Off removes this device's copy; 'delete everything synced' removes all. Certificates: issued by the server from synced progress with the same strengthOf the situation page uses, only at 'sure'. A public, noindex page per certificate shows the situation, date and what was measured; no name (one can be typed for printing and is not stored). The scope line says it is listening comprehension in one situation, not a language diploma. Migration 0004 (progress_devices, certificates); both in APP_TABLES. Privacy flows declared; the practice note now says 'unless you switch sync on'. Roadmap items move to the changelog. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
20 lines
738 B
SQL
20 lines
738 B
SQL
CREATE TABLE "certificates" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"actor_id" text NOT NULL,
|
|
"scene_id" text NOT NULL,
|
|
"askable" integer NOT NULL,
|
|
"held" integer NOT NULL,
|
|
"stuck" integer NOT NULL,
|
|
"issued_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE "progress_devices" (
|
|
"actor_id" text NOT NULL,
|
|
"device_id" text NOT NULL,
|
|
"key" text NOT NULL,
|
|
"value" jsonb NOT NULL,
|
|
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
CONSTRAINT "progress_devices_actor_id_device_id_key_pk" PRIMARY KEY("actor_id","device_id","key")
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE INDEX "certificates_actor_scene_idx" ON "certificates" USING btree ("actor_id","scene_id"); |