diff --git a/src/paperless/settings/custom.py b/src/paperless/settings/custom.py index 12f8986b1..6f7d94201 100644 --- a/src/paperless/settings/custom.py +++ b/src/paperless/settings/custom.py @@ -119,15 +119,4 @@ def parse_db_settings(data_dir: Path) -> dict[str, dict[str, Any]]: }, ) - databases = {"default": db_config} - - # Add SQLite fallback for PostgreSQL/MariaDB - # TODO: Is this really useful/used? - if engine in ("postgresql", "mariadb"): - databases["sqlite"] = { - "ENGINE": "django.db.backends.sqlite3", - "NAME": str((data_dir / "db.sqlite3").resolve()), - "OPTIONS": {}, - } - - return databases + return {"default": db_config} diff --git a/src/paperless/tests/settings/test_custom_parsers.py b/src/paperless/tests/settings/test_custom_parsers.py index 7d4422d28..e297d9e04 100644 --- a/src/paperless/tests/settings/test_custom_parsers.py +++ b/src/paperless/tests/settings/test_custom_parsers.py @@ -59,11 +59,6 @@ class TestParseDbSettings: "sslkey": None, }, }, - "sqlite": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": None, # Will be replaced with tmp_path - "OPTIONS": {}, - }, }, id="postgresql-defaults", ), @@ -96,11 +91,6 @@ class TestParseDbSettings: }, }, }, - "sqlite": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": None, # Will be replaced with tmp_path - "OPTIONS": {}, - }, }, id="postgresql-overrides", ), @@ -128,11 +118,6 @@ class TestParseDbSettings: }, }, }, - "sqlite": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": None, # Will be replaced with tmp_path - "OPTIONS": {}, - }, }, id="postgresql-legacy-poolsize", ), @@ -159,11 +144,6 @@ class TestParseDbSettings: "connect_timeout": 30, }, }, - "sqlite": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": None, # Will be replaced with tmp_path - "OPTIONS": {}, - }, }, id="postgresql-legacy-ssl-and-timeout", ), @@ -191,11 +171,6 @@ class TestParseDbSettings: }, }, }, - "sqlite": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": None, # Will be replaced with tmp_path - "OPTIONS": {}, - }, }, id="mariadb-defaults", ), @@ -228,11 +203,6 @@ class TestParseDbSettings: }, }, }, - "sqlite": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": None, # Will be replaced with tmp_path - "OPTIONS": {}, - }, }, id="mariadb-overrides", ), @@ -266,11 +236,6 @@ class TestParseDbSettings: "connect_timeout": 25, }, }, - "sqlite": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": None, # Will be replaced with tmp_path - "OPTIONS": {}, - }, }, id="mariadb-legacy-ssl-and-timeout", ), @@ -295,10 +260,6 @@ class TestParseDbSettings: expected_database_settings["default"]["NAME"] = str( tmp_path / "db.sqlite3", ) - if "sqlite" in expected_database_settings: - expected_database_settings["sqlite"]["NAME"] = str( - tmp_path / "db.sqlite3", - ) settings = parse_db_settings(tmp_path)