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

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

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

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

  return app.save(collection)
})
