修复(迁移): 193 的 WHEN 子句不能引用 TG_OP,改为只比较 OLD/NEW

This commit is contained in:
yml
2026-12-04 12:19:19 +08:00
parent 0cf50923cc
commit e4be3f6cd9
2 changed files with 4 additions and 4 deletions
@@ -97,7 +97,7 @@ test('路由变更重算只在实际改变路由事实时触发(迁移 193)'
// 无变化写入如果也重算,热门 SKU 会超过 statement_timeout 拖死入库。
assert.ok(triggerScopeMigration.includes('CREATE TRIGGER trg_sku_route_refresh_fulfillments'))
assert.ok(triggerScopeMigration.includes('WHEN ('))
assert.ok(triggerScopeMigration.includes("TG_OP <> 'UPDATE'"))
assert.ok(!triggerScopeMigration.includes('TG_OP'), 'WHEN 子句不能引用 TG_OP')
for (const column of [
'channel',
'enabled',