30 lines
680 B
JavaScript
30 lines
680 B
JavaScript
|
|
/// <reference path="../pb_data/types.d.ts" />
|
||
|
|
migrate((app) => {
|
||
|
|
const collection = app.findCollectionByNameOrId("pbc_4163081445")
|
||
|
|
|
||
|
|
// remove field
|
||
|
|
collection.fields.removeById("file1030067157")
|
||
|
|
|
||
|
|
return app.save(collection)
|
||
|
|
}, (app) => {
|
||
|
|
const collection = app.findCollectionByNameOrId("pbc_4163081445")
|
||
|
|
|
||
|
|
// add field
|
||
|
|
collection.fields.addAt(7, new Field({
|
||
|
|
"hidden": false,
|
||
|
|
"id": "file1030067157",
|
||
|
|
"maxSelect": 1,
|
||
|
|
"maxSize": 0,
|
||
|
|
"mimeTypes": [],
|
||
|
|
"name": "documentFiles",
|
||
|
|
"presentable": false,
|
||
|
|
"protected": false,
|
||
|
|
"required": false,
|
||
|
|
"system": false,
|
||
|
|
"thumbs": [],
|
||
|
|
"type": "file"
|
||
|
|
}))
|
||
|
|
|
||
|
|
return app.save(collection)
|
||
|
|
})
|