You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1e6ab15
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: content/docs/references/data/field.mdx
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ const result = AddressSchema.parse(data);
80
80
|**storage**|`{ notNull?: boolean }`| optional | Physical storage constraints (ADR-0113). Owns the DDL the write contract deliberately does not imply. Absent = no storage-level constraint requested. |
81
81
|**searchable**|`boolean`| optional | Is searchable |
82
82
|**multiple**|`boolean`| optional | Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image. |
83
-
|**unique**|`boolean \| 'global'`| optional | Unique constraint. true = unique within the tenant (composite with the tenant column on tenant-scoped objects); 'global' = unique platform-wide across all tenants|
83
+
|**unique**|`boolean \| 'global' \| 'organization'`| optional | Unique constraint and its scope (ADR-0120). 'organization' = one holder per organization (NULL-safe composite with the organization key part on organization-scoped objects) — prefer this explicit spelling in new code; true = same per-organization scope (positional synonym, stays valid); 'global' = one holder across the whole installation. 'tenant'/'org' are rejected — the word is 'organization'|
84
84
|**defaultValue**|`any`| optional | Default value |
85
85
|**maxLength**|`number`| optional | Max character length |
86
86
|**minLength**|`number`| optional | Min character length |
Copy file name to clipboardExpand all lines: content/docs/references/data/object.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ const result = ApiMethod.parse(data);
68
68
|**name**|`string`| optional | Index name (auto-generated if not provided) |
69
69
|**fields**|`string[]`| ✅ | Fields included in the index |
70
70
|**type**|`Enum<'btree' \| 'hash' \| 'gin' \| 'gist' \| 'fulltext'>`| ✅ | Index algorithm type |
71
-
|**unique**|`boolean \| 'global'`| ✅ | Whether the index enforces uniqueness. Materialized over exactly `fields` — no tenant column is injected; list the tenant column explicitly for a per-tenant index. 'global' is a synonym of true, for symmetry with field-level `unique`|
71
+
|**unique**|`boolean \| 'global' \| 'organization'`| ✅ | Whether the index enforces uniqueness, and at which scope (ADR-0120). 'global' = materialized over exactly `fields`, no organization column injected — one holder across the whole installation; 'organization' = the driver prepends the NULL-safe organization key part (COALESCE(organization_id, '__global__')) at registration — one holder per organization; bare true = deprecated positional spelling of 'global' (warned in 17.x by lint unique/unscoped-declared-index, rejected at protocol 18, #5082) — state the scope. 'tenant'/'org' are rejected — the word is 'organization'|
72
72
|**partial**|`string`| optional | Partial index condition (SQL WHERE clause for conditional indexes) |
73
73
74
74
@@ -122,7 +122,7 @@ const result = ApiMethod.parse(data);
122
122
|**datasource**|`string`| optional | Target Datasource ID. "default" is the primary DB. |
|**fieldGroups**|`{ key: string; label: string; icon?: string; description?: string; … }[]`| optional | Ordered list of field groups (array order = display order). See ObjectFieldGroupSchema. |
0 commit comments