Hello from MCP server
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3751605114")
// update collection data
unmarshal({
"createRule": "org.id = @request.auth.activeOrg || @request.auth.id = user.id",
"listRule": "org.id = @request.auth.activeOrg || @request.auth.id = user.id",
"updateRule": "org.id = @request.auth.activeOrg || @request.auth.id = user.id",
"viewRule": "org.id = @request.auth.activeOrg || @request.auth.id = user.id"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3751605114")
// update collection data
unmarshal({
"createRule": null,
"listRule": null,
"updateRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})