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

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

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

  // add field
  collection.fields.addAt(6, new Field({
    "hidden": false,
    "id": "number3657818954",
    "max": null,
    "min": 1,
    "name": "max_participants",
    "onlyInt": true,
    "presentable": false,
    "required": true,
    "system": false,
    "type": "number"
  }))

  return app.save(collection)
})
