Files
junhong_cmp_fiber/openspec/changes/archive/2026-08-10-fix-iccid-uniqueness-migration/proposal.md
break f15a64395f
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m30s
修复反馈
2026-08-10 16:30:38 +08:00

25 lines
822 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Why
线上活跃的 20 位 ICCID 可以共享前 19 位,现有 000178 迁移却将全部活跃卡的 `iccid_19` 设为唯一,导致从版本 140 升级时必然中止。
## What Changes
- 修正 ICCID 唯一性迁移:仅对原始 ICCID 长度为 19 的活跃卡要求 `iccid_19` 唯一。
- 保持原始 ICCID 长度为 20 的活跃卡以 `iccid_20` 为唯一标识,允许其共享 `iccid_19` 前缀。
- 同步调整迁移前置校验、索引谓词与索引注释。
## Capabilities
### New Capabilities
无。
### Modified Capabilities
- `asset-device`: 明确 19 位与 20 位 ICCID 的有效唯一性边界。
## Impact
- `migrations/000178_make_iot_card_iccid_exact_unique.up.sql`
- 测试环境中的定向索引修复验证;不改变卡数据或 HTTP API也不对生产库执行迁移。