/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
  const collection = new Collection({
    "id": "0f66m7amfl25mue",
    "created": "2024-08-29 21:31:24.549Z",
    "updated": "2024-08-29 21:31:24.549Z",
    "name": "listas",
    "type": "base",
    "system": false,
    "schema": [
      {
        "system": false,
        "id": "bg2sxtmm",
        "name": "nombre",
        "type": "text",
        "required": true,
        "presentable": false,
        "unique": false,
        "options": {
          "min": null,
          "max": 120,
          "pattern": ""
        }
      },
      {
        "system": false,
        "id": "e3ay9ul4",
        "name": "descripcion",
        "type": "text",
        "required": false,
        "presentable": false,
        "unique": false,
        "options": {
          "min": null,
          "max": 250,
          "pattern": ""
        }
      },
      {
        "system": false,
        "id": "kxreowp9",
        "name": "completado",
        "type": "bool",
        "required": false,
        "presentable": false,
        "unique": false,
        "options": {}
      }
    ],
    "indexes": [],
    "listRule": null,
    "viewRule": null,
    "createRule": null,
    "updateRule": null,
    "deleteRule": null,
    "options": {}
  });

  return Dao(db).saveCollection(collection);
}, (db) => {
  const dao = new Dao(db);
  const collection = dao.findCollectionByNameOrId("0f66m7amfl25mue");

  return dao.deleteCollection(collection);
})
