summaryrefslogtreecommitdiff
path: root/db/drop_table.py
diff options
context:
space:
mode:
Diffstat (limited to 'db/drop_table.py')
-rw-r--r--db/drop_table.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/drop_table.py b/db/drop_table.py
new file mode 100644
index 0000000..3b8d1ff
--- /dev/null
+++ b/db/drop_table.py
@@ -0,0 +1,8 @@
+import psycopg2
+import os
+
+conn = psycopg2.connect(os.environ.get("DATABASE_URL") or "dbname=questbook user=postgres")
+conn.cursor().execute("drop table messages")
+conn.commit()
+
+