- 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.
53 lines
1.1 KiB
JavaScript
53 lines
1.1 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
|
|
|
|
// add
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "mx3g38jd",
|
|
"name": "role",
|
|
"type": "select",
|
|
"required": true,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"maxSelect": 1,
|
|
"values": [
|
|
"admin",
|
|
"employee"
|
|
]
|
|
}
|
|
}))
|
|
|
|
// add
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "pgfyrf71",
|
|
"name": "display_name",
|
|
"type": "text",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"min": null,
|
|
"max": null,
|
|
"pattern": ""
|
|
}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
}, (db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("_pb_users_auth_")
|
|
|
|
// remove
|
|
collection.schema.removeField("mx3g38jd")
|
|
|
|
// remove
|
|
collection.schema.removeField("pgfyrf71")
|
|
|
|
return dao.saveCollection(collection)
|
|
})
|