Initial commit

This commit is contained in:
maurice
2025-12-27 22:43:37 +01:00
commit 890f3b5571
26 changed files with 2579 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_4227797064")
// update collection data
unmarshal({
"createRule": "medewerker.id = @request.auth.id",
"updateRule": "medewerker.id = @request.auth.id"
}, collection)
// add field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "autodate820045582",
"name": "uitgeklokt",
"onCreate": false,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}))
// update field
collection.fields.addAt(2, new Field({
"hidden": false,
"id": "autodate2939903645",
"name": "ingeklokt",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_4227797064")
// update collection data
unmarshal({
"createRule": null,
"updateRule": null
}, collection)
// remove field
collection.fields.removeById("autodate820045582")
// update field
collection.fields.addAt(2, new Field({
"hidden": false,
"id": "autodate2939903645",
"name": "datumtijd",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
}))
return app.save(collection)
})