Files
learning-platform/app/pb_migrations/1779544653_created_source_documents.js
RaymondVerhoef 472685f0d7 Add specifications for gamification, generation, and R42 chat services
- Introduced gamification service spec detailing responsibilities, API surface, XP calculation, levels, streaks, badges, milestone cards, and heatmap data.
- Added generation service spec outlining the process for generating micro learning content, including API endpoints, AI call configuration, prompt strategies, and error handling.
- Created R42 chat service spec covering chatbot interactions, retrieval pipeline, prompt construction, response generation, and stateless design principles.
2026-05-23 18:13:08 +02:00

140 lines
3.1 KiB
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "0lr0nf3rzh5tdq3",
"created": "2026-05-23 13:57:33.625Z",
"updated": "2026-05-23 13:57:33.625Z",
"name": "source_documents",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "ju0ymfsy",
"name": "filename",
"type": "text",
"required": true,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"system": false,
"id": "7q9zkqtk",
"name": "file",
"type": "file",
"required": false,
"presentable": false,
"unique": false,
"options": {
"mimeTypes": [
"application/pdf",
"text/markdown",
"text/x-markdown",
"text/plain"
],
"thumbs": [],
"maxSelect": 1,
"maxSize": 52428800,
"protected": false
}
},
{
"system": false,
"id": "ny7sztwr",
"name": "format",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"pdf",
"md",
"txt"
]
}
},
{
"system": false,
"id": "sitx0eng",
"name": "status",
"type": "select",
"required": true,
"presentable": false,
"unique": false,
"options": {
"maxSelect": 1,
"values": [
"processing",
"processed",
"failed"
]
}
},
{
"system": false,
"id": "p7qduuyn",
"name": "ingested_at",
"type": "date",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
},
{
"system": false,
"id": "tahewcck",
"name": "chunk_count",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
},
{
"system": false,
"id": "d0x4m7ow",
"name": "created_by",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "_pb_users_auth_",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}
],
"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("0lr0nf3rzh5tdq3");
return dao.deleteCollection(collection);
})