24 lines
545 B
JavaScript
24 lines
545 B
JavaScript
/// <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.
|
|
})
|