Recipie/api/pb_migrations/1755056714_updated_recipes.js

45 lines
988 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_842702175")
// add field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "number1485952547",
"max": null,
"min": null,
"name": "worktime",
"onlyInt": true,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
// add field
collection.fields.addAt(10, new Field({
"hidden": false,
"id": "number2198822773",
"max": null,
"min": null,
"name": "waittime",
"onlyInt": true,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_842702175")
// remove field
collection.fields.removeById("number1485952547")
// remove field
collection.fields.removeById("number2198822773")
return app.save(collection)
})