mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-08-08 14:02:09 +02:00
Support deletion of documents when a connector is deleted (#271)
This commit is contained in:
@@ -29,6 +29,9 @@ def wipe_all_rows(database: str) -> None:
|
||||
table_names = cur.fetchall()
|
||||
|
||||
# have to delete from these first to not run into psycopg2.errors.ForeignKeyViolation
|
||||
cur.execute(f"DELETE FROM chunk")
|
||||
cur.execute(f"DELETE FROM document_by_connector_credential_pair")
|
||||
cur.execute(f"DELETE FROM document")
|
||||
cur.execute(f"DELETE FROM connector_credential_pair")
|
||||
cur.execute(f"DELETE FROM index_attempt")
|
||||
conn.commit()
|
||||
|
Reference in New Issue
Block a user