Files
learning-platform/pb_migrations/1780700000_sources_progress.js

22 lines
511 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const sources = app.findCollectionByNameOrId("sources");
sources.fields.add(new Field({
"hidden": false,
"id": "json_progress",
"maxSize": 0,
"name": "progress",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}));
app.save(sources);
}, (app) => {
const sources = app.findCollectionByNameOrId("sources");
sources.fields.removeById("json_progress");
app.save(sources);
});