From de7ec73a477746cb18957b683c44114abf5509d2 Mon Sep 17 00:00:00 2001 From: hobart Date: Mon, 26 May 2025 13:57:54 +0900 Subject: [PATCH] fix: update comments for schema handling in SQLite and PostgreSQL - Changed comment in db.py to clarify setting schema to None for SQLite. - Updated comment in env.py to specify that schema settings are applied only in PostgreSQL. --- backend/open_webui/internal/db.py | 2 +- backend/open_webui/migrations/env.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/internal/db.py b/backend/open_webui/internal/db.py index 8c5129708..4b0654217 100644 --- a/backend/open_webui/internal/db.py +++ b/backend/open_webui/internal/db.py @@ -100,7 +100,7 @@ else: SessionLocal = sessionmaker( autocommit=False, autoflush=False, bind=engine, expire_on_commit=False ) -# SQLite를 사용하는 경우 스키마를 None으로 설정 +# Set schema to None if using SQLite if "sqlite" in SQLALCHEMY_DATABASE_URL: metadata_obj = MetaData(schema=None) else: diff --git a/backend/open_webui/migrations/env.py b/backend/open_webui/migrations/env.py index 36f57424b..bf4d04cc5 100644 --- a/backend/open_webui/migrations/env.py +++ b/backend/open_webui/migrations/env.py @@ -78,7 +78,7 @@ def run_migrations_online() -> None: with connectable.connect() as connection: if target_metadata.schema and connection.dialect.name == 'postgresql': - # PostgreSQL에서만 스키마 설정 적용 + # Applying schema settings only in PostgreSQL connection.execute( text(f"SET search_path TO {target_metadata.schema}, public") )