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

  // add field
  collection.fields.addAt(3, new Field({
    "cascadeDelete": false,
    "collectionId": "pbc_340646327",
    "hidden": false,
    "id": "relation3177167065",
    "maxSelect": 1,
    "minSelect": 0,
    "name": "tournament",
    "presentable": false,
    "required": false,
    "system": false,
    "type": "relation"
  }))

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

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

  return app.save(collection)
})
