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_2873630990")

  // add variables field - JSON type for organization-specific pricing variables
  collection.fields.addAt(5, new Field({
    "hidden": false,
    "id": "json3847291056",
    "maxSize": 0,
    "name": "variables",
    "presentable": false,
    "required": false,
    "system": false,
    "type": "json"
  }))

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

  // remove variables field
  collection.fields.removeById("json3847291056")

  return app.save(collection)
})