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

30 lines
675 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_173434244")
// add field
collection.fields.addAt(2, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text3078290644",
"max": 0,
"min": 0,
"name": "cityCode",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_173434244")
// remove field
collection.fields.removeById("text3078290644")
return app.save(collection)
})