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.
This commit is contained in:
tcely 2024-12-11 12:33:14 -05:00 committed by GitHub
parent 679f77b6b4
commit a11e3487d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,6 +46,13 @@ else:
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.sqlite3',
'NAME': CONFIG_BASE_DIR / 'db.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"]}"' DATABASE_CONNECTION_STR = f'sqlite at "{DATABASES["default"]["NAME"]}"'