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