Files
pay/internal/model
wangjia 00e032f577 fix(v2): uq_delivery 索引显式升级迁移(AutoMigrate 不改同名索引)+ refund_id NOT NULL DEFAULT ''
AutoMigrate 只按名字判断索引是否存在,P2 时代库升级后同名 uq_delivery 仍停在
2 列,store.EnqueueDelivery 的 3 列 ON CONFLICT 每次调用(含普通 payment
webhook)都报 "ON CONFLICT clause does not match any PRIMARY KEY or UNIQUE
constraint"(reviewer 在 glebarez/sqlite 上实测复现)。新增
model.UpgradeWebhookDeliveryIndex,AutoMigrate 后显式检测/加宽索引 +
backfill refund_id,main.go 与 OpenTestDB 两处调用点接入;RefundID 补
not null;default:'' 补上 NULL/"" 语义缺口。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
2026-07-10 16:42:29 +08:00
..