87 lines
1.8 KiB
JavaScript
87 lines
1.8 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_2032083498")
|
|
|
|
// remove field
|
|
collection.fields.removeById("text41510942")
|
|
|
|
// remove field
|
|
collection.fields.removeById("text1394985671")
|
|
|
|
// add field
|
|
collection.fields.addAt(4, new Field({
|
|
"hidden": false,
|
|
"id": "file41510942",
|
|
"maxSelect": 1,
|
|
"maxSize": 0,
|
|
"mimeTypes": [],
|
|
"name": "skin",
|
|
"presentable": false,
|
|
"protected": false,
|
|
"required": false,
|
|
"system": false,
|
|
"thumbs": [],
|
|
"type": "file"
|
|
}))
|
|
|
|
// add field
|
|
collection.fields.addAt(5, new Field({
|
|
"hidden": false,
|
|
"id": "file1394985671",
|
|
"maxSelect": 1,
|
|
"maxSize": 0,
|
|
"mimeTypes": [],
|
|
"name": "cape",
|
|
"presentable": false,
|
|
"protected": false,
|
|
"required": false,
|
|
"system": false,
|
|
"thumbs": [],
|
|
"type": "file"
|
|
}))
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_2032083498")
|
|
|
|
// add field
|
|
collection.fields.addAt(3, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text41510942",
|
|
"max": 0,
|
|
"min": 0,
|
|
"name": "skin",
|
|
"pattern": "",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
// add field
|
|
collection.fields.addAt(4, new Field({
|
|
"autogeneratePattern": "",
|
|
"hidden": false,
|
|
"id": "text1394985671",
|
|
"max": 0,
|
|
"min": 0,
|
|
"name": "cape",
|
|
"pattern": "",
|
|
"presentable": false,
|
|
"primaryKey": false,
|
|
"required": false,
|
|
"system": false,
|
|
"type": "text"
|
|
}))
|
|
|
|
// remove field
|
|
collection.fields.removeById("file41510942")
|
|
|
|
// remove field
|
|
collection.fields.removeById("file1394985671")
|
|
|
|
return app.save(collection)
|
|
})
|