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

  // add field
  collection.fields.addAt(5, new Field({
    "hidden": false,
    "id": "boolVarianceApproved",
    "name": "varianceApproved",
    "presentable": false,
    "required": false,
    "system": false,
    "type": "bool"
  }))

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

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

  return app.save(collection)
})

