feat: implement micro-learning system with content delivery components, completion tracking hooks, and database schema migrations
This commit is contained in:
23
pb_migrations/1780800001_deleted_legacy_collections.js
Normal file
23
pb_migrations/1780800001_deleted_legacy_collections.js
Normal 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.
|
||||
})
|
||||
Reference in New Issue
Block a user