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

  // update field
  collection.fields.addAt(10, new Field({
    "hidden": false,
    "id": "file538556518",
    "maxSelect": 1,
    "maxSize": 6000000,
    "mimeTypes": [],
    "name": "glitch_logo",
    "presentable": false,
    "protected": false,
    "required": false,
    "system": false,
    "thumbs": [],
    "type": "file"
  }))

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

  // update field
  collection.fields.addAt(10, new Field({
    "hidden": false,
    "id": "file538556518",
    "maxSelect": 1,
    "maxSize": 0,
    "mimeTypes": [],
    "name": "glitch_logo",
    "presentable": false,
    "protected": false,
    "required": false,
    "system": false,
    "thumbs": [],
    "type": "file"
  }))

  return app.save(collection)
})
