add option to add database schema as env var

This commit is contained in:
MadsLang
2024-12-10 15:18:26 +01:00
parent 29a2719595
commit 332188535e
2 changed files with 6 additions and 2 deletions

View File

@@ -269,6 +269,8 @@ DATABASE_URL = os.environ.get("DATABASE_URL", f"sqlite:///{DATA_DIR}/webui.db")
if "postgres://" in DATABASE_URL:
DATABASE_URL = DATABASE_URL.replace("postgres://", "postgresql://")
DATABASE_SCHEMA = os.environ.get("DATABASE_SCHEMA", None)
DATABASE_POOL_SIZE = os.environ.get("DATABASE_POOL_SIZE", 0)
if DATABASE_POOL_SIZE == "":