Stabilize Cloudron SQLite and refine planner suggestions

This commit is contained in:
2026-04-12 20:37:57 +02:00
parent 325101da99
commit 35e6a7b56e
7 changed files with 173 additions and 40 deletions
+2
View File
@@ -18,9 +18,11 @@ def get_db() -> sqlite3.Connection:
g.db = sqlite3.connect(
current_app.config["DATABASE_PATH"],
detect_types=sqlite3.PARSE_DECLTYPES,
timeout=30,
)
g.db.row_factory = sqlite3.Row
g.db.execute("PRAGMA foreign_keys = ON")
g.db.execute("PRAGMA busy_timeout = 30000")
return g.db