Skip to content

autonumber 业务标识字段默认不唯一,可铸重号 —— 裁定:默认唯一(租户复合形状),显式退出才不唯一 #13894

Description

@huangyiirene

按维护者裁定上行立卡(2026-08-31,hotcrm#1301 决裁批 #19-hotcrm ②,批复「其他同意」采纳呈报「定性业务标识符 + 平台路线」)。

平台级 declared ≠ enforced(实测)

裁定方向

autonumber 字段默认 unique,租户复合形状照 case_number 既有样板;显式声明退出才不唯一。

设计约束(实现 + 复审判断)

  1. 退出通道的拼写与 docblock(何时合法退出:纯展示序号等),⛔ 不发明超出需要的配置面;
  2. 存量重号处理必须响亮:默认翻转时,已有数据含重号的表建索引会失败 —— 迁移/启动路径要检测并点名重号行 + 修复指引,⛔ 不静默跳过、⛔ 不静默降级为不唯一;
  3. The #8686 tenancy backfill destroys the autonumber high-water mark: the merge targets a row that does not exist yet, the __global__ row is deleted unconditionally, and an already-allocated business identifier is re-issued #12394(烧号重发)/Seed loader writes untenanted rows while the REST path stamps an organization — one single-tenant install runs two autonumber scopes and mints duplicate business identifiers, silently (17.0.0 GA) #8686(计数器分裂)的修复交互写进 PR —— 默认唯一会把那两类缺陷从「静默重号」变「响亮拒绝」,这是意图的一部分;
  4. 条款②:YES(路径肢 packages/spec/src/** 预期命中 + 内容肢:已发布 autonumber 契约行为变化),契约复审档位,changeset 标行为变化;
  5. 首个消费者/验收:hotcrm 八字段在平台默认下获得唯一性、零应用侧声明(hotcrm#1301 已改挂本卡)。

Refs: hotcrm#1301(九字段测量)· hotcrm#1292(被措辞误导的前卡)· #12394 · #12395 · #8686 · #13848

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions