Skip to content

[finding] content/docs/data-modeling/field-types.mdx states unique as boolean, default false — wrong scope vocabulary, and wrong default for autonumber after #13894 #14901

Description

@os-sam

Found while implementing #13894 (autonumber fields default to unique: 'organization'). Hand-written page, so it does not regenerate itself; filed rather than edited in the #13894 PR per the dispatch's scope fence (that card lands in packages/spec).

Where: content/docs/data-modeling/field-types.mdx, the common-properties table row:

| `unique` | `boolean` | `false` | Enforce uniqueness |

What is wrong (two things, one pre-existing):

  1. Type. The contract has been boolean | 'global' | 'organization' since ADR-0120 D1 (the scope vocabulary), and the same page already uses unique: 'organization' in its own example ({ name: 'email', ..., unique: 'organization' } near the top). The row still says boolean. Pre-existing.
  2. Default. After autonumber 业务标识字段默认不唯一,可铸重号 —— 裁定:默认唯一(租户复合形状),显式退出才不唯一 #13894 the default is type-conditional: false on every type except autonumber, where an omitted unique resolves to 'organization' (one holder per organization, the tenant-composite index). The row's unconditional false is now wrong for the one type where the default matters most.

Suggested fix: one row edit — type boolean \| 'global' \| 'organization', default false ('organization' on autonumber), description pointing at the generated reference (/docs/references/data/field, which carries the full rule from the .describe()), plus a sentence in the autonumber section of the same page saying the number is unique per organization by default and that unique: false is the explicit opt-out for a display-only sequence.

Refs: #13894 (parent), ADR-0120.

Blocked-by: #13894


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions