29 lines
751 B
JavaScript
29 lines
751 B
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_2032083498")
|
|
|
|
// update collection data
|
|
unmarshal({
|
|
"createRule": "@request.auth.id = user.id",
|
|
"deleteRule": "@request.auth.id = user.id",
|
|
"listRule": "@request.auth.id = user.id",
|
|
"updateRule": "@request.auth.id = user.id",
|
|
"viewRule": "@request.auth.id = user.id"
|
|
}, collection)
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_2032083498")
|
|
|
|
// update collection data
|
|
unmarshal({
|
|
"createRule": null,
|
|
"deleteRule": null,
|
|
"listRule": null,
|
|
"updateRule": null,
|
|
"viewRule": null
|
|
}, collection)
|
|
|
|
return app.save(collection)
|
|
})
|