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

  // add field
  collection.fields.addAt(7, new Field({
    "cascadeDelete": false,
    "collectionId": "pbc_2337082678",
    "hidden": false,
    "id": "relation4016499630",
    "maxSelect": 1,
    "minSelect": 0,
    "name": "resources",
    "presentable": false,
    "required": false,
    "system": false,
    "type": "relation"
  }))

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

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

  return app.save(collection)
})
