Use write ahead logging in sqlite3 connection

This commit is contained in:
Tim Kächele 2025-04-22 09:48:27 +02:00
parent 256abc6222
commit 34f37667ef

View File

@ -4,10 +4,14 @@ from app.types import Order
def connect(connection_string):
return sqlite3.connect(
connection = sqlite3.connect(
connection_string, detect_types=sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES
)
connection.execute("pragma journal_mode=wal")
return connection
def apply_database_schema(connection):
connection.execute(