/// migrate((db) => { const dao = new Dao(db) const collection = dao.findCollectionByNameOrId("x5adjlc0txf16r8") // remove old url cover field collection.schema.removeField("cover_field") // add new file cover field collection.schema.addField(new SchemaField({ "system": false, "id": "cover_file", "name": "cover", "type": "file", "required": false, "presentable": false, "unique": false, "options": { "maxSelect": 1, "maxSize": 5242880, "mimeTypes": ["image/jpeg","image/png","image/gif","image/webp","image/svg+xml"], "thumbs": null, "protected": false } })) return dao.saveCollection(collection) }, (db) => { const dao = new Dao(db) const collection = dao.findCollectionByNameOrId("x5adjlc0txf16r8") // remove file cover field collection.schema.removeField("cover_file") // restore url cover field collection.schema.addField(new SchemaField({ "system": false, "id": "cover_field", "name": "cover", "type": "url", "required": false, "presentable": false, "unique": false, "options": { "exceptDomains": null, "onlyDomains": null } })) return dao.saveCollection(collection) })