2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-31 00:21:15 +00:00

Make WAL mode configurable for sqlite (#11585)

This commit is contained in:
Oliver
2026-03-21 19:46:22 +11:00
committed by GitHub
parent 6d8606bbe4
commit 3a3816307e
2 changed files with 4 additions and 2 deletions

View File

@@ -148,5 +148,6 @@ def set_sqlite_options(db_options: dict):
# not possible to implement any lower isolation levels in SQLite.
# https://www.sqlite.org/isolation.html
# Specify that we want to use Write-Ahead Logging (WAL) mode for SQLite databases, as this allows for better concurrency and performance
db_options['init_command'] = 'PRAGMA journal_mode=WAL;'
if get_boolean_setting('INVENTREE_DB_WAL_MODE', 'database.wal_mode', True):
# Specify that we want to use Write-Ahead Logging (WAL) mode for SQLite databases, as this allows for better concurrency and performance
db_options['init_command'] = 'PRAGMA journal_mode=WAL;'