| 1 | /// <reference path="../pb_data/types.d.ts" /> |
| 2 | migrate((app) => |
| 3 | const collection = |
| 4 | |
| 5 | // remove field |
| 6 | collection.fields.removeById |
| 7 | |
| 8 | // remove field |
| 9 | collection.fields.removeById |
| 10 | |
| 11 | // add field |
| 12 | collection.fields.addAt |
| 13 | "hidden": false, |
| 14 | "id": "number2499937429", |
| 15 | "max": null, |
| 16 | "min": null, |
| 17 | "name": "lat", |
| 18 | "onlyInt": false, |
| 19 | "presentable": false, |
| 20 | "required": false, |
| 21 | "system": false, |
| 22 | "type": "number" |
| 23 | })) |
| 24 | |
| 25 | // add field |
| 26 | collection.fields.addAt |
| 27 | "hidden": false, |
| 28 | "id": "number999795048", |
| 29 | "max": null, |
| 30 | "min": null, |
| 31 | "name": "long", |
| 32 | "onlyInt": false, |
| 33 | "presentable": false, |
| 34 | "required": false, |
| 35 | "system": false, |
| 36 | "type": "number" |
| 37 | })) |
| 38 | |
| 39 | return app.save |
| 40 | }, (app) => |
| 41 | const collection = |
| 42 | |
| 43 | // add field |
| 44 | collection.fields.addAt |
| 45 | "autogeneratePattern": "", |
| 46 | "hidden": false, |
| 47 | "id": "text2499937429", |
| 48 | "max": 0, |
| 49 | "min": 0, |
| 50 | "name": "lat", |
| 51 | "pattern": "", |
| 52 | "presentable": false, |
| 53 | "primaryKey": false, |
| 54 | "required": false, |
| 55 | "system": false, |
| 56 | "type": "text" |
| 57 | })) |
| 58 | |
| 59 | // add field |
| 60 | collection.fields.addAt |
| 61 | "autogeneratePattern": "", |
| 62 | "hidden": false, |
| 63 | "id": "text999795048", |
| 64 | "max": 0, |
| 65 | "min": 0, |
| 66 | "name": "long", |
| 67 | "pattern": "", |
| 68 | "presentable": false, |
| 69 | "primaryKey": false, |
| 70 | "required": false, |
| 71 | "system": false, |
| 72 | "type": "text" |
| 73 | })) |
| 74 | |
| 75 | // remove field |
| 76 | collection.fields.removeById |
| 77 | |
| 78 | // remove field |
| 79 | collection.fields.removeById |
| 80 | |
| 81 | return app.save |
| 82 | }) |