fix(sync): remove invalid col.indexes access that crashed sync script

This commit is contained in:
Agent Zero
2026-08-07 00:47:54 +02:00
parent 0c985818b1
commit fde2b0c756
-12
View File
@@ -263,18 +263,6 @@ async def sync_plugin_schemas() -> None:
except Exception as exc:
logger.error("Failed to add index '%s' on '%s': %s", idx.name, table_name, exc)
# Also check for column-level indexes (index=True on mapped_column)
for col in mapper.columns:
for idx in col.indexes:
if idx.name and idx.name not in db_indexes:
index_ddl = _build_index_ddl(idx)
try:
await conn.execute(text(index_ddl))
logger.info("Added index '%s' on table '%s'", idx.name, table_name)
added_indexes += 1
except Exception as exc:
logger.error("Failed to add index '%s' on '%s': %s", idx.name, table_name, exc)
logger.info(
"Schema sync complete: %d columns added, %d indexes added",
added_columns,