fix: correct PostgreSQL migration parameter passing

Why this change is needed:
PostgreSQLDB.execute() expects data as a dictionary, not multiple
positional arguments. The migration code was incorrectly unpacking
a list with *values, causing TypeError.

How it solves it:
- Changed values from list to dict: {col: row_dict[col] for col in columns}
- Pass values dict directly to execute() without unpacking
- Matches execute() signature which expects dict[str, Any] | None

Impact:
- Fixes PostgreSQL E2E test failures
- Enables successful legacy data migration for PostgreSQL

Testing:
- Will be verified by PostgreSQL E2E tests in CI
This commit is contained in:
BukeLy 2025-11-20 03:12:18 +08:00
parent cedb3d49d2
commit b29f32b513

View file

@ -2350,9 +2350,9 @@ class PGVectorStorage(BaseVectorStorage):
ON CONFLICT DO NOTHING
"""
# AsyncPG requires positional parameters as a list in order
values = [row_dict[col] for col in columns]
await db.execute(insert_query, *values)
# Construct dict for execute() method
values = {col: row_dict[col] for col in columns}
await db.execute(insert_query, values)
migrated_count += len(rows)
logger.info(