Parcourir la source

修正 hxcs 排序字段验证口径

hxcs 数据库存在大写兼容表/视图名,information_schema 会返回重复的排序字段记录。验证改为按 LOWER(TABLE_NAME) 去重统计,保持当前修复范围不包含网站模板。\n\nValidation:\n- bash -n local-run/bin/sync-to-hxcs-prod.sh\n- 只读查询 hxcs information_schema 确认 sort_number 字段存在
非繁 il y a 4 mois
Parent
commit
2ee3a94b11
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      local-run/bin/sync-to-hxcs-prod.sh

+ 1 - 1
local-run/bin/sync-to-hxcs-prod.sh

@@ -699,7 +699,7 @@ LEFT JOIN sp_gzhx_apps.article a ON a.websiteid=w.websiteid;
 "
 
 	verify_sql "排序字段覆盖当前后台列表(不含网站模板)" "
-SELECT IF(COUNT(*)=9,1,0)
+SELECT IF(COUNT(DISTINCT LOWER(TABLE_NAME))=9,1,0)
 FROM information_schema.COLUMNS
 WHERE TABLE_SCHEMA='sp_gzhx_apps'
   AND COLUMN_NAME='sort_number'