fp/services/pocketbase/pb_migrations/1762500151_updated_vods.js
CJ_Clippy 6caf2dbcc3
Some checks failed
ci / test (push) Failing after 9m42s
fp/our CI/CD / build (push) Successful in 1m19s
add /vods and /vt/:slug/vods
2025-11-08 12:36:26 -08:00

49 lines
1.0 KiB
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_144770472")
// remove field
collection.fields.removeById("text3277268710")
// add field
collection.fields.addAt(15, new Field({
"hidden": false,
"id": "file3277268710",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "thumbnail",
"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(10, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text3277268710",
"max": 0,
"min": 0,
"name": "thumbnail",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// remove field
collection.fields.removeById("file3277268710")
return app.save(collection)
})