| 1 | /// <reference path="../pb_data/types.d.ts" /> |
| 2 | migrate((app) => |
| 3 | const collection = |
| 4 | |
| 5 | // add field |
| 6 | collection.fields.addAt |
| 7 | "hidden": false, |
| 8 | "id": "file3309110367", |
| 9 | "maxSelect": 1, |
| 10 | "maxSize": 0, |
| 11 | "mimeTypes": [], |
| 12 | "name": "image", |
| 13 | "presentable": false, |
| 14 | "protected": false, |
| 15 | "required": false, |
| 16 | "system": false, |
| 17 | "thumbs": [], |
| 18 | "type": "file" |
| 19 | })) |
| 20 | |
| 21 | return app.save |
| 22 | }, (app) => |
| 23 | const collection = |
| 24 | |
| 25 | // remove field |
| 26 | collection.fields.removeById |
| 27 | |
| 28 | return app.save |
| 29 | }) |