49 lines
1.0 KiB
JavaScript
49 lines
1.0 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_108570809")
|
|
|
|
// add field
|
|
collection.fields.addAt(10, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text3571151285",
|
|
"max": 0,
|
|
"min": 0,
|
|
"name": "language",
|
|
"pattern": "",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
// add field
|
|
collection.fields.addAt(11, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text1767278655",
|
|
"max": 0,
|
|
"min": 0,
|
|
"name": "currency",
|
|
"pattern": "",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_108570809")
|
|
|
|
// remove field
|
|
collection.fields.removeById("text3571151285")
|
|
|
|
// remove field
|
|
collection.fields.removeById("text1767278655")
|
|
|
|
return app.save(collection)
|
|
})
|