fix: correct table name from 'services' to 'hermes_services' in all SQL and definitions
This commit is contained in:
parent
9396aaed21
commit
ff5f42b4fa
@ -16,14 +16,14 @@ from datetime import datetime
|
||||
# - logined_userorgid param in CRUD definition enables framework-level org filtering
|
||||
SERVICES_CRUD = {
|
||||
"module": "hermes-web-cli",
|
||||
"table": "services",
|
||||
"table": "hermes_services",
|
||||
"operations": {
|
||||
"create": {
|
||||
"name": "create_service_record",
|
||||
"description": "Create a new service record for the current organization",
|
||||
"parameters": ["orgid", "name", "service_url", "description", "apikey"],
|
||||
"sql_template": """
|
||||
INSERT INTO services (id, orgid, name, service_url, description, apikey, status, created_at, updated_at)
|
||||
INSERT INTO hermes_services (id, orgid, name, service_url, description, apikey, status, created_at, updated_at)
|
||||
VALUES (${id}$, ${orgid}$, ${name}$, ${service_url}$, ${description}$, ${apikey}$, ${status}$, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
|
||||
""",
|
||||
"return_fields": ["id"]
|
||||
@ -35,7 +35,7 @@ SERVICES_CRUD = {
|
||||
"sql_template": """
|
||||
SELECT id, orgid, name, service_url, description, apikey, status,
|
||||
created_at, updated_at
|
||||
FROM services
|
||||
FROM hermes_services
|
||||
WHERE orgid = ${orgid}$
|
||||
ORDER BY created_at DESC
|
||||
""",
|
||||
@ -48,7 +48,7 @@ SERVICES_CRUD = {
|
||||
"sql_template": """
|
||||
SELECT id, orgid, name, service_url, description, apikey, status,
|
||||
created_at, updated_at
|
||||
FROM services
|
||||
FROM hermes_services
|
||||
WHERE id = ${service_id}$ AND orgid = ${orgid}$
|
||||
""",
|
||||
"return_fields": ["id", "orgid", "name", "service_url", "description", "apikey", "status", "created_at", "updated_at"]
|
||||
@ -58,7 +58,7 @@ SERVICES_CRUD = {
|
||||
"description": "Update an existing service record",
|
||||
"parameters": ["service_id", "orgid", "name", "service_url", "description", "apikey", "status"],
|
||||
"sql_template": """
|
||||
UPDATE services
|
||||
UPDATE hermes_services
|
||||
SET name = ${name}$,
|
||||
service_url = ${service_url}$,
|
||||
description = ${description}$,
|
||||
@ -74,7 +74,7 @@ SERVICES_CRUD = {
|
||||
"description": "Delete a service record for the current organization",
|
||||
"parameters": ["service_id", "orgid"],
|
||||
"sql_template": """
|
||||
DELETE FROM services
|
||||
DELETE FROM hermes_services
|
||||
WHERE id = ${service_id}$ AND orgid = ${orgid}$
|
||||
""",
|
||||
"return_fields": []
|
||||
|
||||
@ -6,7 +6,7 @@ Follows database-table-definition-spec: summary/fields/indexes/codes four-sectio
|
||||
# Services table definition
|
||||
SERVICES_TABLE = {
|
||||
"summary": {
|
||||
"name": "services",
|
||||
"name": "hermes_services",
|
||||
"description": "Stores Hermes service configurations for each organization",
|
||||
"module": "hermes-web-cli"
|
||||
},
|
||||
|
||||
@ -240,7 +240,7 @@ async def test_service_connection(service_id: str, orgid: str = "") -> Tuple[boo
|
||||
recs = await sor.sqlExe("""
|
||||
SELECT id, orgid, name, service_url, description, apikey, status,
|
||||
created_at, updated_at
|
||||
FROM services
|
||||
FROM hermes_services
|
||||
WHERE id = ${service_id}$
|
||||
""", {
|
||||
'service_id': service_id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user