Hello from MCP server

List Files | Just Commands | Repo | Logs

← back |
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
  const collection = app.findCollectionByNameOrId("pbc_650605163")

  // add field
  collection.fields.addAt(6, new Field({
    "cascadeDelete": false,
    "collectionId": "pbc_2014092141",
    "hidden": false,
    "id": "relation943899508",
    "maxSelect": 999,
    "minSelect": 0,
    "name": "menuCopy",
    "presentable": false,
    "required": false,
    "system": false,
    "type": "relation"
  }))

  return app.save(collection)
}, (app) => {
  const collection = app.findCollectionByNameOrId("pbc_650605163")

  // remove field
  collection.fields.removeById("relation943899508")

  return app.save(collection)
})