fix: 修复决策339老库补列顺序并撤除回填兼容逻辑

This commit is contained in:
lianjianwei2024
2026-11-15 09:33:05 +08:00
parent 935c830135
commit ffdeb32700
3 changed files with 8 additions and 26 deletions

View File

@@ -313,17 +313,6 @@ def migrate_match_keys():
con.commit()
finally:
con.close()
# 决策 339:模糊档前缀键回填+建索引(列由 _ensure_batch_schema 补;回填要 match.name_pre 现算,
# 必须在该列存在后跑——放 migrate_match_keys 之后,与 setkey 回填同一启动序列)
con = sqlite3.connect(DB)
try:
nb = match.backfill_name_pre(con)
if nb:
print("迁移:bills 模糊档前缀键回填 %d 行(决策 339)" % nb, flush=True)
con.execute("CREATE INDEX IF NOT EXISTS ix_bill_namepre ON bills(x_name_pre)")
con.commit()
finally:
con.close()
scon = sess.connect()
try:
if not _hash9_current(scon, "s_bills"):