49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_144770472")
|
|
|
|
// remove field
|
|
collection.fields.removeById("text3367203181")
|
|
|
|
// add field
|
|
collection.fields.addAt(20, new Field({
|
|
"hidden": false,
|
|
"id": "file3367203181",
|
|
"maxSelect": 1,
|
|
"maxSize": 0,
|
|
"mimeTypes": [],
|
|
"name": "hlsPlaylist",
|
|
"presentable": false,
|
|
"protected": false,
|
|
"required": false,
|
|
"system": false,
|
|
"thumbs": [],
|
|
"type": "file"
|
|
}))
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_144770472")
|
|
|
|
// add field
|
|
collection.fields.addAt(20, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text3367203181",
|
|
"max": 0,
|
|
"min": 0,
|
|
"name": "hlsPlaylist",
|
|
"pattern": "",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
// remove field
|
|
collection.fields.removeById("file3367203181")
|
|
|
|
return app.save(collection)
|
|
})
|