46 lines
1019 B
JavaScript
46 lines
1019 B
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_1305841361")
|
|
|
|
// add field
|
|
collection.fields.addAt(9, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text1579384326",
|
|
"max": 0,
|
|
"min": 0,
|
|
"name": "name",
|
|
"pattern": "",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
// add field
|
|
collection.fields.addAt(10, new Field({
|
|
"exceptDomains": null,
|
|
"hidden": false,
|
|
"id": "email3885137012",
|
|
"name": "email",
|
|
"onlyDomains": null,
|
|
"presentable": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "email"
|
|
}))
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_1305841361")
|
|
|
|
// remove field
|
|
collection.fields.removeById("text1579384326")
|
|
|
|
// remove field
|
|
collection.fields.removeById("email3885137012")
|
|
|
|
return app.save(collection)
|
|
})
|