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:
parent
cedb3d49d2
commit
b29f32b513
1 changed files with 3 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue