Skip to content

Commit

Permalink
fix: 修复迁移脚本未能正确捕获异常的问题 (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 authored Oct 19, 2024
1 parent 39ac208 commit 3171f8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/

## [Unreleased]

### Fixed

- 修复迁移脚本未能正确捕获异常的问题

## [0.4.3] - 2024-08-29

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from alembic import op
from nonebot import logger
from sqlalchemy.exc import IdentifierError

revision: str = "9492159f98f7"
down_revision: str | Sequence[str] | None = "ac57f7074e58"
Expand All @@ -38,7 +37,7 @@ def upgrade(name: str = "") -> None:
type_="foreignkey",
)
logger.info("[user] 已成功删除外键约束")
except (ValueError, IdentifierError):
except Exception:
logger.debug("[user] 未找到外键约束,跳过删除")
# ### end Alembic commands ###

Expand Down

0 comments on commit 3171f8c

Please sign in to comment.