Files
gitlab-instance-0a899031_no…/pb_migrations/1760629707_updated_city.js
eric be7f773e79 s
2025-10-16 15:58:07 +00:00

30 lines
672 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_173434244")
// add field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "file3760176746",
"maxSelect": 99,
"maxSize": 0,
"mimeTypes": [],
"name": "images",
"presentable": false,
"protected": false,
"required": false,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_173434244")
// remove field
collection.fields.removeById("file3760176746")
return app.save(collection)
})