/// migrate((app) => { const collection = new Collection({ "createRule": "@request.auth.id != ''", "deleteRule": "@request.auth.id != ''", "fields": [ { "autogeneratePattern": "[a-z0-9]{15}", "hidden": false, "id": "text3208210256", "max": 15, "min": 15, "name": "id", "pattern": "^[a-z0-9]+$", "presentable": false, "primaryKey": true, "required": true, "system": true, "type": "text" }, { "hidden": false, "id": "autodate2990389176", "name": "created", "onCreate": true, "onUpdate": false, "presentable": false, "system": true, "type": "autodate" }, { "hidden": false, "id": "autodate3332085495", "name": "updated", "onCreate": true, "onUpdate": true, "presentable": false, "system": true, "type": "autodate" }, { "autogeneratePattern": "", "hidden": false, "id": "text491676904", "max": 0, "min": 0, "name": "company_name", "pattern": "", "presentable": false, "primaryKey": false, "required": true, "system": false, "type": "text" }, { "autogeneratePattern": "", "hidden": false, "id": "text223244161", "max": 0, "min": 0, "name": "address", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "autogeneratePattern": "", "hidden": false, "id": "text2526027604", "max": 0, "min": 0, "name": "number", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "exceptDomains": null, "hidden": false, "id": "email3885137012", "name": "email", "onlyDomains": null, "presentable": false, "required": false, "system": false, "type": "email" }, { "autogeneratePattern": "", "hidden": false, "id": "text2299572365", "max": 0, "min": 0, "name": "vat_number", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "autogeneratePattern": "", "hidden": false, "id": "text953081790", "max": 0, "min": 0, "name": "registration_number", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" } ], "id": "pbc_1010367695", "indexes": [], "listRule": "@request.auth.id != ''", "name": "company_details", "system": false, "type": "base", "updateRule": "@request.auth.id != ''", "viewRule": "@request.auth.id != ''" }); return app.save(collection); }, (app) => { const collection = app.findCollectionByNameOrId("pbc_1010367695"); return app.delete(collection); })