From a11e3487d65e4cff14cb0d462e6015f08c6fe322 Mon Sep 17 00:00:00 2001 From: tcely Date: Wed, 11 Dec 2024 12:33:14 -0500 Subject: [PATCH] Add database options where newer Django expects them The `3.2.x` versions don't have a lot of the code that `5.1.x` uses for this. --- tubesync/tubesync/local_settings.py.container | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container index a0426a4c..c52bf588 100644 --- a/tubesync/tubesync/local_settings.py.container +++ b/tubesync/tubesync/local_settings.py.container @@ -46,6 +46,13 @@ else: 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': CONFIG_BASE_DIR / 'db.sqlite3', + "OPTIONS": { + "transaction_mode": "IMMEDIATE", + "init_command": """ + PRAGMA auto_vacuum = INCREMENTAL; + PRAGMA incremental_vacuum(100); + """, + }, } } DATABASE_CONNECTION_STR = f'sqlite at "{DATABASES["default"]["NAME"]}"'