auto flush databases
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user