From fa6ae2b3328dc60966c28e7239a1cfb3aada84b7 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 8 May 2025 20:16:56 -0700 Subject: [PATCH] Use drop table if exists --- sqlite_utils/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index a471bbd..363b069 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -713,7 +713,7 @@ class Database: except Exception: self._supports_on_conflict = False finally: - self.conn.execute("drop table {}".format(table_name)) + self.conn.execute("drop table if exists {}".format(table_name)) return self._supports_on_conflict @property