fp/services/pocketbase/pb_migrations/1761911220_updated_vtubers.js
2025-11-05 20:49:00 -09:00

47 lines
1.0 KiB
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3872109612")
// remove field
collection.fields.removeById("number2960516043")
// add field
collection.fields.addAt(23, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text2960516043",
"max": 0,
"min": 0,
"name": "themeColor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3872109612")
// add field
collection.fields.addAt(23, new Field({
"hidden": false,
"id": "number2960516043",
"max": null,
"min": null,
"name": "themeColor",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
// remove field
collection.fields.removeById("text2960516043")
return app.save(collection)
})