Files
korrithwebsite/apps/pocketbase/pb_migrations/1782226667_001_deleted_assessments.js
T

16 lines
523 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
try {
const collection = app.findCollectionByNameOrId("assessments");
return app.delete(collection);
} catch (e) {
if (e.message.includes("no rows in result set")) {
console.log("Collection not found, skipping delete");
return;
}
throw e;
}
}, (app) => {
// Note: The down migration cannot restore data, only the collection structure
// You would need to manually recreate the collection structure here if needed
})