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