1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_4148374969")
// add field
collection.fields.addAt(8, new Field({
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text105650625",
"max": 0,
"min": 0,
"name": "category",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_4148374969")
// remove field
collection.fields.removeById("text105650625")
return app.save(collection)
})
|