mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-05 20:32:29 +00:00
chore: remove RPC commands support from db
This commit is contained in:
parent
65b5aee8f2
commit
d63e12a38a
41
packages/daemon/migrations/1686841115_deleted_rpc_cmds.js
Normal file
41
packages/daemon/migrations/1686841115_deleted_rpc_cmds.js
Normal file
@ -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);
|
||||
})
|
15
packages/daemon/migrations/1686841133_updated_rpc.js
Normal file
15
packages/daemon/migrations/1686841133_updated_rpc.js
Normal file
@ -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)
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user