Feat: Added schema for new feature (maintenance and incident) include the user management roles.

This commit is contained in:
Tola Leng
2025-05-26 18:02:31 +08:00
parent 4f1c78f8e1
commit fe1b94d8e3
2 changed files with 67 additions and 0 deletions
Binary file not shown.
@@ -0,0 +1,67 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3142635823")
// add field
collection.fields.addAt(6, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text3687080900",
"max": 0,
"min": 0,
"name": "full_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// add field
collection.fields.addAt(7, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text4166911607",
"max": 0,
"min": 0,
"name": "username",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// add field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"active",
"inactive"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3142635823")
// remove field
collection.fields.removeById("text3687080900")
// remove field
collection.fields.removeById("text4166911607")
// remove field
collection.fields.removeById("select2063623452")
return app.save(collection)
})