Run the backend suite on Dev Postgres instead of isolated SQLite.
Deploy Development / deploy (push) Successful in 55s
Test Suite / backend-postgres (push) Failing after 7s
Test Suite / frontend-build (push) Successful in 16s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-07 14:28:17 +02:00
1 parent 709370da93
commit 36b9a2e424
34 files changed
+234 -79

No files matched your search

+5 -3
View File
@@ -1,7 +1,8 @@
"""Translate SQLite-oriented SQL so the same stores can run against PostgreSQL.
Local Windows development and tests keep SQLite. Docker/Server set
KANSHO_DB_BACKEND=postgres. Identity, keys and journal bodies are not logged here.
Windows without Docker still uses SQLite for the running app. Docker/Server and
the test suite use PostgreSQL (`KANSHO_DB_BACKEND=postgres`). Identity, keys and
journal bodies are not logged here.
"""
from __future__ import annotations
@@ -29,7 +30,8 @@ def use_postgres() -> bool:
"""Decide the engine at connect time, not at import time.
Explicit KANSHO_DB_BACKEND wins. KANSHO_DB_PATH without an explicit postgres
backend keeps tests on isolated SQLite even inside a Compose container.
backend keeps the Windows local app on SQLite. Tests set postgres and DB_NAME
kansho_test on the Dev instance, never kansho_dev.
"""
raw = (os.environ.get("KANSHO_DB_BACKEND") or "").strip().lower()
if raw in {"sqlite", "sqlite3"}: