Add pocketbase util

This commit is contained in:
2025-11-14 09:57:07 +13:00
parent bd746f4e75
commit e930e75646
7 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("jbzxvie5c27b6od")
// update collection data
unmarshal({
"createRule": "",
"deleteRule": "",
"updateRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("jbzxvie5c27b6od")
// update collection data
unmarshal({
"createRule": null,
"deleteRule": null,
"updateRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})

View File

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

View File

@@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("my9ej2vdwzwoqov")
// update collection data
unmarshal({
"listRule": "@request.auth.email=\"site@breadone.net\""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("my9ej2vdwzwoqov")
// update collection data
unmarshal({
"listRule": ""
}, collection)
return app.save(collection)
})

View File

@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("jbzxvie5c27b6od")
// update collection data
unmarshal({
"listRule": "@request.auth.email=\"site@breadone.net\"",
"viewRule": "@request.auth.email=\"site@breadone.net\""
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("jbzxvie5c27b6od")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})