From 51c3f2639c8f3b73592ae493787e36421df45684 Mon Sep 17 00:00:00 2001 From: "agent.develop" Date: Mon, 21 Sep 2026 13:38:12 +0800 Subject: [PATCH] =?UTF-8?q?deliver:=20=E4=BA=A4=E4=BB=98=E6=94=B6=E5=8F=A3?= =?UTF-8?q?=EF=BC=88=E5=BC=95=E6=93=8E=E4=BB=A3=E4=B8=BA=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/m11b2c_a3_patch_tx_write.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/m11b2c_a3_patch_tx_write.py b/scripts/m11b2c_a3_patch_tx_write.py index 7ac5aa8..71537b3 100644 --- a/scripts/m11b2c_a3_patch_tx_write.py +++ b/scripts/m11b2c_a3_patch_tx_write.py @@ -53,13 +53,14 @@ def _has_db_default(fd): 写路径按语义不填它们;若计入必填集合,合法调用会被误报缺列。 (与 _recognize nullable 写法配套:只修识别不修默认值排除,事件表主链路会被误挡。) """ + if "default" not in fd: + return False dv = fd.get("default") if dv is None: return False - s = str(dv).strip() - if s == "" or s.upper() in ("NULL", "NONE"): + if str(dv).strip().upper() in ("NULL", "NONE"): return False - return True + return True # 含 DEFAULT ''(空串默认值同样是 DDL 默认值,数据库会补值) def required_columns(table):