Hello from MCP server
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3981801833")
// add field
collection.fields.addAt(8, new Field({
"cascadeDelete": false,
"collectionId": "pbc_2170393721",
"hidden": false,
"id": "relation3420824369",
"maxSelect": 1,
"minSelect": 0,
"name": "book",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3981801833")
// remove field
collection.fields.removeById("relation3420824369")
return app.save(collection)
})