Fail to start when using non-sqlite for snappea

See #252

This is not backwards compatible (it will now hard-break), but given snappea's
rather particular design decisions this is probably for the best, and given
what else was just discovered on #252 I strongly doubt anyone was actually using
it in such setups anyway.
This commit is contained in:
Klaas van Schelven
2025-10-23 22:04:17 +02:00
parent 314154a6b7
commit 32be257172

View File

@@ -67,3 +67,13 @@ def check_no_nested_settings_in_unnested_form(app_configs, **kwargs):
id="snappea.W001",
))
return errors
@register("snappea")
def check_using_sqlite(app_configs, **kwargs):
if "sqlite" not in django_settings.DATABASES['snappea']['ENGINE']: # covers both timed_sqlite_backend and sqlite3
return [Warning(
"The snappea 'database' backend (queue really) is not set to use SQLite. It should be.", id="snappea.W002",
)]
return []