Files
operacle--checkcle/server/pb_migrations/1756994399_updated__superusers.js
2026-07-13 12:31:02 +08:00

30 lines
671 B
JavaScript

/// <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)
})