mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix: remove hardcoded schema prefix from migrate_llm_models query
The raw SQL query in migrate_llm_models() hardcoded platform."AgentNode" which fails in CI where tables are in 'public' schema (not 'platform'). This code exists in dev but only runs when LLM registry has data. With our new schema, the migration tries to run at startup and fails in CI. Changed: UPDATE platform."AgentNode" -> UPDATE "AgentNode" Matches pattern of all other migrations - let connection string's default schema handle routing.
This commit is contained in:
@@ -1670,7 +1670,7 @@ async def migrate_llm_models(migrate_to: LlmModel):
|
||||
# Update each block
|
||||
for id, path in llm_model_fields.items():
|
||||
query = f"""
|
||||
UPDATE platform."AgentNode"
|
||||
UPDATE "AgentNode"
|
||||
SET "constantInput" = jsonb_set("constantInput", $1, to_jsonb($2), true)
|
||||
WHERE "agentBlockId" = $3
|
||||
AND "constantInput" ? ($4)::text
|
||||
|
||||
Reference in New Issue
Block a user