refactor: update database schema and migration files

This commit is contained in:
Tola Leng
2025-10-11 20:45:10 +07:00
parent ee5e66eb44
commit 7392580db8
17 changed files with 833 additions and 66 deletions
@@ -0,0 +1,29 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3142635823")
// add field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "file376926767",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "avatar",
"presentable": false,
"protected": false,
"required": false,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3142635823")
// remove field
collection.fields.removeById("file376926767")
return app.save(collection)
})