astro_advokat/backend/pb_migrations/1774357136_updated_reviews.js

29 lines
697 B
JavaScript
Raw Normal View History

2026-03-30 20:21:41 +05:00
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_4163081445")
// add field
collection.fields.addAt(9, new Field({
"cascadeDelete": false,
"collectionId": "pbc_2130617118",
"hidden": false,
"id": "relation2435933116",
"maxSelect": 1,
"minSelect": 0,
"name": "case_category",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_4163081445")
// remove field
collection.fields.removeById("relation2435933116")
return app.save(collection)
})