/// 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" }, { "cascadeDelete": false, "collectionId": "pbc_2527524235", "hidden": false, "id": "relation1802619892", "maxSelect": 1, "minSelect": 0, "name": "quote", "presentable": false, "required": true, "system": false, "type": "relation" }, { "autogeneratePattern": "", "hidden": false, "id": "text1843675174", "max": 0, "min": 0, "name": "description", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "autogeneratePattern": "", "hidden": false, "id": "text2888347927", "max": 0, "min": 0, "name": "quote_number", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "autogeneratePattern": "", "hidden": false, "id": "text692179049", "max": 0, "min": 0, "name": "quote_reference", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "hidden": false, "id": "number2683508278", "max": null, "min": null, "name": "quantity", "onlyInt": false, "presentable": false, "required": false, "system": false, "type": "number" }, { "cascadeDelete": false, "collectionId": "pbc_3355664324", "hidden": false, "id": "relation2603248766", "maxSelect": 1, "minSelect": 0, "name": "supplier", "presentable": false, "required": false, "system": false, "type": "relation" }, { "hidden": false, "id": "number2437584093", "max": null, "min": null, "name": "cost_price", "onlyInt": false, "presentable": false, "required": false, "system": false, "type": "number" }, { "hidden": false, "id": "number2737583402", "max": null, "min": null, "name": "selling_price", "onlyInt": false, "presentable": false, "required": false, "system": false, "type": "number" }, { "autogeneratePattern": "", "hidden": false, "id": "text18589324", "max": 0, "min": 0, "name": "notes", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "hidden": false, "id": "bool537097956", "name": "is_processed", "presentable": false, "required": false, "system": false, "type": "bool" }, { "hidden": false, "id": "number637752195", "max": null, "min": null, "name": "markup", "onlyInt": false, "presentable": false, "required": false, "system": false, "type": "number" }, { "hidden": false, "id": "bool2874796552", "name": "included_in_quote", "presentable": false, "required": false, "system": false, "type": "bool" }, { "autogeneratePattern": "", "hidden": false, "id": "text1806133073", "max": 0, "min": 0, "name": "quote_pdf_id", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" } ], "id": "pbc_470828888", "indexes": [], "listRule": "@request.auth.id != ''", "name": "quote_items", "system": false, "type": "base", "updateRule": "@request.auth.id != ''", "viewRule": "@request.auth.id != ''" }); return app.save(collection); }, (app) => { const collection = app.findCollectionByNameOrId("pbc_470828888"); return app.delete(collection); })