From 2d7664085a53517389bf9c3234530d434471d0c3 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 2 Dec 2024 12:12:04 +0100
Subject: [PATCH] Ensure DbConn encapsulates its executions into rollbackable
 transactions.

---
 src/ytplom/misc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ytplom/misc.py b/src/ytplom/misc.py
index 805f22f..4c26b4b 100644
--- a/src/ytplom/misc.py
+++ b/src/ytplom/misc.py
@@ -152,7 +152,7 @@ class DbConn:
                 raise HandledException(
                         f'wrong database version {cur_version}, expected: '
                         f'{EXPECTED_DB_VERSION} – run "migrate"?')
-        self._conn = sql_connect(self._path)
+        self._conn = sql_connect(self._path, autocommit=False)
 
     def __enter__(self) -> Self:
         return self
-- 
2.30.2