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

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

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

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

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

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

  return app.save(collection)
})
