Add pocketbase util
This commit is contained in:
22
pb/pb_migrations/1763067184_updated_posts.js
Normal file
22
pb/pb_migrations/1763067184_updated_posts.js
Normal 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)
|
||||
})
|
||||
Reference in New Issue
Block a user