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