fp/services/pocketbase/pb_migrations/1762531591_deleted_vtuber_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

64 lines
1.5 KiB
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3009055234");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3208210256",
"max": 0,
"min": 0,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"hidden": false,
"id": "_clone_h4Aw",
"max": "",
"min": "",
"name": "streamDate",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_yNn2",
"max": 0,
"min": 0,
"name": "displayName",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}
],
"id": "pbc_3009055234",
"indexes": [],
"listRule": null,
"name": "vtuber_vods",
"system": false,
"type": "view",
"updateRule": null,
"viewQuery": "SELECT\n vods.id,\n vods.streamDate,\n vtubers.displayName\nFROM vods\nLEFT JOIN vtubers",
"viewRule": null
});
return app.save(collection);
})