feat: implement micro-learning system with content delivery components, completion tracking hooks, and database schema migrations

This commit is contained in:
RaymondVerhoef
2026-05-24 23:40:59 +02:00
parent 8930ac03ae
commit 55bcb689e7
11 changed files with 700 additions and 166 deletions

View File

@@ -0,0 +1,23 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collectionsToDrop = [
"learn_progress",
"quiz_banks",
"quiz_cache",
"quiz_results"
];
for (const name of collectionsToDrop) {
try {
const collection = app.findCollectionByNameOrId(name);
if (collection) {
app.delete(collection);
}
} catch (err) {
// Ignore if not found
}
}
}, (app) => {
// Downgrade would normally recreate these, but we omit it here for simplicity
// since they are deprecated.
})