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

  // add field
  collection.fields.addAt(7, new Field({
    "hidden": false,
    "id": "select1542800728",
    "maxSelect": 1,
    "name": "field",
    "presentable": false,
    "required": true,
    "system": false,
    "type": "select",
    "values": [
      "coworking_wheel",
      "coworking_table",
      "personal_workshop",
      "group_workshop"
    ]
  }))

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

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

  return app.save(collection)
})
