fix(database): use logger as log output

Co-Authored-By: Aqr-K <95741669+Aqr-K@users.noreply.github.com>
This commit is contained in:
DDSRem
2025-08-23 18:36:11 +08:00
co-authored by Aqr-K
parent cb1dd9f17d
commit 2766e80346
3 changed files with 16 additions and 14 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import contextlib
from alembic import op
import sqlalchemy as sa
from app.log import logger
from app.db import SessionFactory
from app.db.models import UserConfig
@@ -69,7 +70,7 @@ def upgrade() -> None:
existing_type=sa.String(),
type_=sa.JSON())
except Exception as e:
print(f"Could not alter column {column_name} in table {table}: {e}")
logger.error(f"Could not alter column {column_name} in table {table}: {e}")
with SessionFactory() as db:
UserConfig.truncate(db)