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