/// migrate((app) => { const collection = app.findCollectionByNameOrId("pbc_2452428166") // update collection data unmarshal({ "listRule": "token = @request.query.token" }, collection) // remove field collection.fields.removeById("bool2034721560") // remove field collection.fields.removeById("date2593941644") // add field collection.fields.addAt(2, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1597481275", "max": 0, "min": 0, "name": "token", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(1, new Field({ "exceptDomains": null, "hidden": false, "id": "email1181691900", "name": "email", "onlyDomains": null, "presentable": false, "required": false, "system": false, "type": "email" })) return app.save(collection) }, (app) => { const collection = app.findCollectionByNameOrId("pbc_2452428166") // update collection data unmarshal({ "listRule": null }, collection) // add field collection.fields.addAt(2, new Field({ "hidden": false, "id": "bool2034721560", "name": "used", "presentable": false, "required": false, "system": false, "type": "bool" })) // add field collection.fields.addAt(3, new Field({ "hidden": false, "id": "date2593941644", "max": "", "min": "", "name": "expires", "presentable": false, "required": false, "system": false, "type": "date" })) // remove field collection.fields.removeById("text1597481275") // update field collection.fields.addAt(1, new Field({ "exceptDomains": null, "hidden": false, "id": "email1181691900", "name": "target", "onlyDomains": null, "presentable": false, "required": false, "system": false, "type": "email" })) return app.save(collection) })