feat(pocketbase): add projects table migrations

This commit is contained in:
2026-03-01 04:03:54 +01:00
parent 552dfc5fc9
commit 0d001a4118
2 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_484305853")
// update collection data
unmarshal({
"createRule": "@request.auth.id != \"\" && @request.auth.id = @request.body.user.id",
"deleteRule": "@request.auth.id != \"\" && @request.auth.id = user.id",
"listRule": "@request.auth.id != \"\" && @request.auth.id = user.id",
"updateRule": "@request.auth.id != \"\" && @request.auth.id = user.id",
"viewRule": "@request.auth.id = user.id"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_484305853")
// update collection data
unmarshal({
"createRule": null,
"deleteRule": null,
"listRule": "",
"updateRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})