Skip to content

Commit 5bf1a4b

Browse files
fix: add if exists in drop to avoid failures
1 parent 6854ee0 commit 5bf1a4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

langchain_postgres/v2/engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ async def _adrop_table(
384384
schema_name: str = "public",
385385
) -> None:
386386
"""Drop the vector store table"""
387-
query = f'DROP TABLE "{schema_name}"."{table_name}";'
387+
query = f'DROP TABLE IF EXISTS "{schema_name}"."{table_name}";'
388388
async with self._pool.connect() as conn:
389389
await conn.execute(text(query))
390390
await conn.commit()

0 commit comments

Comments
 (0)