30 lines
674 B
JavaScript
30 lines
674 B
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_977978967")
|
|
|
|
// add field
|
|
collection.fields.addAt(6, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text1798508311",
|
|
"max": 0,
|
|
"min": 0,
|
|
"name": "NOTI_ID",
|
|
"pattern": "",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_977978967")
|
|
|
|
// remove field
|
|
collection.fields.removeById("text1798508311")
|
|
|
|
return app.save(collection)
|
|
})
|