Fix account_risk_state missing on PostgreSQL: probe table before cache skip.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -120,6 +120,14 @@ def is_schema_migration_error(exc: BaseException) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def is_missing_relation_error(exc: BaseException) -> bool:
|
||||
"""表/视图不存在。"""
|
||||
if is_schema_migration_error(exc):
|
||||
msg = str(exc).lower()
|
||||
return any(x in msg for x in ("no such table", "does not exist", "undefined table"))
|
||||
return False
|
||||
|
||||
|
||||
def rollback_if_postgres(conn: "DbConnection") -> None:
|
||||
if is_postgres():
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user