Files
dm-companion/pb_migrations/1748472065_updated_relationships.js

29 lines
795 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_617371094")
// update collection data
unmarshal({
"createRule": "",
"deleteRule": "@request.auth.id = primary.campaign.owner.id",
"listRule": "@request.auth.id = primary.campaign.owner.id",
"updateRule": "@request.auth.id = primary.campaign.owner.id",
"viewRule": "@request.auth.id = primary.campaign.owner.id"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_617371094")
// update collection data
unmarshal({
"createRule": null,
"deleteRule": null,
"listRule": null,
"updateRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})