Files
dashboard-icons/web/backend/pb_migrations/1759319167_updated_submissions.js

50 lines
1.1 KiB
JavaScript
Raw Normal View History

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_632646243")
// remove field
collection.fields.removeById("json989021800")
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "json1595063097",
"maxSize": 0,
"name": "extras",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_632646243")
// add field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "json989021800",
"maxSize": 0,
"name": "categories",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}))
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "json1595063097",
"maxSize": 0,
"name": "aliases",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}))
return app.save(collection)
})