diff --git a/packages/daemon/migrations/1686841115_deleted_rpc_cmds.js b/packages/daemon/migrations/1686841115_deleted_rpc_cmds.js new file mode 100644 index 00000000..76f88f8d --- /dev/null +++ b/packages/daemon/migrations/1686841115_deleted_rpc_cmds.js @@ -0,0 +1,41 @@ +migrate((db) => { + const dao = new Dao(db); + const collection = dao.findCollectionByNameOrId("enp8mrv5ewtrltj"); + + return dao.deleteCollection(collection); +}, (db) => { + const collection = new Collection({ + "id": "enp8mrv5ewtrltj", + "created": "2023-01-06 10:21:51.659Z", + "updated": "2023-06-07 22:41:11.725Z", + "name": "rpc_cmds", + "type": "base", + "system": false, + "schema": [ + { + "system": false, + "id": "jbostfhp", + "name": "name", + "type": "text", + "required": true, + "unique": true, + "options": { + "min": null, + "max": null, + "pattern": "" + } + } + ], + "indexes": [ + "CREATE UNIQUE INDEX \"idx_unique_jbostfhp\" on \"rpc_cmds\" (\"name\")" + ], + "listRule": null, + "viewRule": null, + "createRule": null, + "updateRule": null, + "deleteRule": null, + "options": {} + }); + + return Dao(db).saveCollection(collection); +}) diff --git a/packages/daemon/migrations/1686841133_updated_rpc.js b/packages/daemon/migrations/1686841133_updated_rpc.js new file mode 100644 index 00000000..78372065 --- /dev/null +++ b/packages/daemon/migrations/1686841133_updated_rpc.js @@ -0,0 +1,15 @@ +migrate((db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("v7s41iokt1vizxd") + + collection.createRule = "userId = @request.auth.id && status='' && result=''" + + return dao.saveCollection(collection) +}, (db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("v7s41iokt1vizxd") + + collection.createRule = null + + return dao.saveCollection(collection) +})