/// migrate((app) => { const collection = app.findCollectionByNameOrId("pbc_480415205"); return app.delete(collection); }, (app) => { const collection = new Collection({ "createRule": null, "deleteRule": null, "fields": [ { "autogeneratePattern": "", "hidden": false, "id": "text3208210256", "max": 0, "min": 0, "name": "id", "pattern": "^[a-z0-9]+$", "presentable": false, "primaryKey": true, "required": true, "system": true, "type": "text" }, { "autogeneratePattern": "", "hidden": false, "id": "_clone_8Fck", "max": 0, "min": 0, "name": "doctor", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" }, { "hidden": false, "id": "number432430951", "max": null, "min": null, "name": "cnt", "onlyInt": false, "presentable": false, "required": false, "system": false, "type": "number" } ], "id": "pbc_480415205", "indexes": [], "listRule": null, "name": "Sergey_Practic_sql", "system": false, "type": "view", "updateRule": null, "viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\nwhere diagnosCode = \"Z10.8\"\n", "viewRule": null }); return app.save(collection); })