pediatric-ai-scribe-v3/migrations
Daniel 025290d64a
Some checks failed
Forgejo Android APK / Root app tests (push) Successful in 47s
Forgejo Docker Build / Root app tests (push) Successful in 45s
Forgejo Android APK / Build signed APK (push) Successful in 2m1s
Forgejo Docker Build / Build Docker image (push) Successful in 9s
Forgejo Docker Build / Deploy to the host (push) Failing after 0s
feat: retire Learning Hub
My Resources generates better slides than Learning Hub ever did — a typed deck
the model fills in, rendered by python-pptx with fit-to-slide text, figures, a
vision review and themes, against Learning Hub's markdown-through-pandoc — and
the articles and quizzes now live in the quiz app. Keeping a second, weaker
generator and a whole CMS beside it was not earning its maintenance.

Removed: three routers, the Learning Hub and Content Manager tabs, their
components and frontend modules, the five database tables, the WebDAV browser,
the content embedding column and its vector index.

Content was exported first — every article as markdown plus a full SQL dump of
all five tables — to ops-backups/learning-hub-export-*. That export is the
restore path; the migration's down() can recreate the shape but never the rows,
and says so.

Two things this simplifies rather than merely deletes:

generated_image_links existed only to record which published content an image
appeared in, and it was the sole reason a generated image could be read by
someone who did not make it. Images are now owner-only — the visibility rule is
one WHERE clause instead of a join across two tables and a published flag.

embeddings.js keeps the model discovery the admin panel uses and loses
searchSimilar and generateContentEmbedding, which queried a table that no longer
exists.

Kept deliberately: Nextcloud connect, disconnect and export, which are how a
generated note reaches a real filesystem and have nothing to do with Learning
Hub; learningRetrieval, which despite its name is the clinical corpus search My
Resources depends on; and the pandoc reference deck, still the fallback when the
python renderer fails, moved from assets/learning to assets/deck now that the
old name misleads.

Tests: four Learning-Hub-only files removed, and the individual cases inside
shared files that asserted its behaviour. Where a test used a Learning endpoint
only as a convenient example — the account-boundary token test, the policy
matrix — it now uses one that still exists, so the property it proves is
unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-12 20:14:20 +02:00
..
1744600000000_example-no-op.js Add node-pg-migrate for versioned schema changes + better mobile UA labels 2026-04-14 05:06:19 +02:00
1744650000000_add-encounter-version.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
1777003849000_add-personal-notes.js feat(notes): personal notes with rich-text editor + voice dictation 2026-04-24 06:18:41 +02:00
1777090000000_notes-trash.js improve learning hub generation flow 2026-05-08 09:32:58 +02:00
1777507197626_add-mermaid-diagrams.js stabilize assistant and add diagrams 2026-05-08 00:23:00 +02:00
1777600000000_add-clinical-assistant-chats.js feat: improve clinical assistant visual sources 2026-05-07 02:45:17 +02:00
1777700000000_add-prompt-revisions.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
1777800000000_generated-images.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
1777900000000_image-context.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
1780000000000_drop-model-classification.js fix: separate Scribe/Clinical/Learning prompt sections; drop model classification entirely with scrub migration 2026-09-07 18:22:51 +02:00
1780100000000_registration-invites.js feat: invite-only registration 2026-09-10 23:12:07 +02:00
1780200000000_citation-audit.js feat: citation quality tracking, and the SSO settings fit a phone 2026-09-10 23:44:43 +02:00
1780300000000_user-resources.js feat: My Resources — anyone can generate teaching material, privately 2026-09-11 14:50:54 +02:00
1780400000000_my-resources-images.js feat: PubMed search for My Resources, and an image tool that actually fires 2026-09-11 16:47:08 +02:00
1780500000000_resource-images.js feat: decks are built with python-pptx instead of pandoc, and carry their figures 2026-09-11 19:34:26 +02:00
1780600000000_resource-deck.js feat: the model designs the deck instead of writing markdown for a parser to guess at 2026-09-11 19:49:55 +02:00
1780700000000_login-codes.js feat: sign in with a code emailed to you, offered beside the password 2026-09-11 20:12:03 +02:00
1780800000000_retire-learning-hub.js feat: retire Learning Hub 2026-09-12 20:14:20 +02:00