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(8, new Field({
"cascadeDelete": false,
"collectionId": "pbc_2873630990",
"hidden": false,
"id": "relation198884247",
"maxSelect": 1,
"minSelect": 0,
"name": "activeOrg",
"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("relation198884247")
return app.save(collection)
})