auto flush databases

This commit is contained in:
Jonas Braus
2024-12-12 13:21:43 +01:00
parent 948210d73c
commit ed5090110c
4 changed files with 33 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
import psycopg2
def flush_pg():
conn = psycopg2.connect(
dbname="embeddings",
user="python",
password="PasswordPassword123",
host="localhost",
port="5555"
)
cur = conn.cursor()
cur.execute("drop table if exists dbtable;")
conn.commit()
conn.close()