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.
This commit is contained in:
hobart 2025-05-26 13:57:54 +09:00
parent ea0f54064e
commit de7ec73a47
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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")
)