/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
  const collection = new Collection({
    "id": "li75ivkr87g3r94",
    "created": "2026-05-23 14:00:42.269Z",
    "updated": "2026-05-23 14:00:42.269Z",
    "name": "micro_learnings",
    "type": "base",
    "system": false,
    "schema": [
      {
        "system": false,
        "id": "ihu0d60m",
        "name": "topic",
        "type": "relation",
        "required": true,
        "presentable": false,
        "unique": false,
        "options": {
          "collectionId": "1ixwljuo2xqxcqj",
          "cascadeDelete": false,
          "minSelect": null,
          "maxSelect": 1,
          "displayFields": null
        }
      },
      {
        "system": false,
        "id": "wdz1hhs6",
        "name": "type",
        "type": "select",
        "required": true,
        "presentable": false,
        "unique": false,
        "options": {
          "maxSelect": 1,
          "values": [
            "concept_explainer",
            "scenario_quiz",
            "misconceptions",
            "how_to",
            "comparison_card",
            "reflection_prompt",
            "flashcard_set",
            "case_study",
            "glossary_anchor",
            "myth_vs_evidence"
          ]
        }
      },
      {
        "system": false,
        "id": "1ccr13b7",
        "name": "content",
        "type": "json",
        "required": false,
        "presentable": false,
        "unique": false,
        "options": {
          "maxSize": 2097152
        }
      },
      {
        "system": false,
        "id": "vdti3gns",
        "name": "status",
        "type": "select",
        "required": true,
        "presentable": false,
        "unique": false,
        "options": {
          "maxSelect": 1,
          "values": [
            "queued",
            "generated",
            "published",
            "rejected"
          ]
        }
      },
      {
        "system": false,
        "id": "hxxcrfw8",
        "name": "generation_model",
        "type": "text",
        "required": false,
        "presentable": false,
        "unique": false,
        "options": {
          "min": null,
          "max": null,
          "pattern": ""
        }
      },
      {
        "system": false,
        "id": "grwpzlhc",
        "name": "generated_at",
        "type": "date",
        "required": false,
        "presentable": false,
        "unique": false,
        "options": {
          "min": "",
          "max": ""
        }
      },
      {
        "system": false,
        "id": "wexudgfp",
        "name": "published_at",
        "type": "date",
        "required": false,
        "presentable": false,
        "unique": false,
        "options": {
          "min": "",
          "max": ""
        }
      }
    ],
    "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("li75ivkr87g3r94");

  return dao.deleteCollection(collection);
})
