Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@
{
"field.timestamp": {
"name": "updatedAt",
"@autoSet": "onUpdate",
"@dbColumnType": "timestamp_with_tz"
"@autoSet": "onUpdate"
}
},
{
Expand Down
3 changes: 1 addition & 2 deletions fixtures/conformance/flattened-kitchen-sink/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@
{
"field.timestamp": {
"name": "updatedAt",
"@autoSet": "onUpdate",
"@dbColumnType": "timestamp_with_tz"
"@autoSet": "onUpdate"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@
{
"field.timestamp": {
"name": "updatedAt",
"@autoSet": "onUpdate",
"@dbColumnType": "timestamp_with_tz"
"@autoSet": "onUpdate"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion fixtures/metamodel-docs/expected/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DB-domain attributes — @column / @db.indexed / @dbColumnType on every field, @
- `field.object`: `@column`, `@db.indexed`, `@dbColumnType`, `@storage`
- `field.string`: `@column`, `@db.indexed`, `@dbColumnType`
- `field.time`: `@autoSet`, `@column`, `@db.indexed`, `@dbColumnType`
- `field.timestamp`: `@autoSet`, `@column`, `@db.indexed`, `@dbColumnType`
- `field.timestamp`: `@autoSet`, `@column`, `@db.indexed`, `@dbColumnType`, `@localTime`
- `field.uuid`: `@column`, `@db.indexed`, `@dbColumnType`
- `identity.reference`: `@constraintName`
- `identity.secondary`: `@expr`, `@orders`, `@using`, `@where`
Expand Down
33 changes: 17 additions & 16 deletions fixtures/metamodel-docs/expected/types/field.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions fixtures/persistence-conformance/canonical/meta.fitness.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{ "field.string": { "name": "title", "@required": true, "@maxLength": 200 } },
{ "field.currency": { "name": "priceCents", "@required": true, "@currency": "USD" } },
{ "field.enum": { "name": "status", "@required": true, "@values": ["DRAFT", "PUBLISHED", "ARCHIVED"] } },
{ "field.timestamp": { "name": "createdAt", "@required": true } },
{ "field.timestamp": { "name": "createdAt", "@required": true, "@localTime": true } },
{ "relationship.composition": { "name": "weeks", "@objectRef": "Week", "@cardinality": "many" } },
{ "identity.primary": { "name": "id", "@fields": "id", "@generation": "increment" } },
{ "identity.secondary": { "name": "byTitle", "@fields": "title", "@unique": true } }
Expand Down Expand Up @@ -58,8 +58,8 @@
{ "field.uuid": { "name": "ownerId", "@required": true } },
{ "field.string": { "name": "externalId", "@dbColumnType": "uuid" } },
{ "field.string": { "name": "payload", "@dbColumnType": "jsonb" } },
{ "field.timestamp": { "name": "recordedAt", "@required": true, "@dbColumnType": "timestamp_with_tz" } },
{ "field.timestamp": { "name": "observedAt", "@required": true } },
{ "field.timestamp": { "name": "recordedAt", "@required": true } },
{ "field.timestamp": { "name": "observedAt", "@required": true, "@localTime": true } },
{ "field.date": { "name": "asOfDate", "@required": true } },
{ "field.time": { "name": "atTime", "@required": true } },
{ "identity.primary": { "name": "id", "@fields": "id", "@generation": "uuid" } }
Expand Down Expand Up @@ -229,8 +229,8 @@
{ "field.boolean": { "name": "bVal", "@required": true } },
{ "field.date": { "name": "dateVal", "@required": true } },
{ "field.time": { "name": "timeVal", "@required": true } },
{ "field.timestamp": { "name": "tsVal", "@required": true } },
{ "field.timestamp": { "name": "tsTzVal", "@required": true, "@dbColumnType": "timestamp_with_tz" } },
{ "field.timestamp": { "name": "tsVal", "@required": true, "@localTime": true } },
{ "field.timestamp": { "name": "tsTzVal", "@required": true } },
{ "field.currency": { "name": "moneyVal", "@required": true, "@currency": "USD" } },
{ "field.enum": { "name": "enumVal", "@required": true, "@values": ["LOW", "MEDIUM", "HIGH"] } },
{ "field.uuid": { "name": "uuidVal", "@required": true } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ description: |
ownerId uuid (field.uuid, non-key)
externalId uuid (field.string + @dbColumnType: uuid)
payload jsonb (field.string + @dbColumnType: jsonb, genuinely-open JSON)
recordedAt timestamp with time zone (field.timestamp + @dbColumnType: timestamp_with_tz)
observedAt timestamp without time zone (field.timestamp → TIMESTAMP)
recordedAt timestamp with time zone (field.timestamp → TIMESTAMPTZ, tz-aware by default)
observedAt timestamp without time zone (field.timestamp + @localTime: true → TIMESTAMP)
asOfDate date (field.date → DATE)
atTime time without time zone (field.time → TIME)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ description: |
payload is a @dbColumnType:jsonb open-JSON column; jsonb re-serializes with
sorted keys per the normalization contract.

recordedAt is a @dbColumnType:timestamp_with_tz column (TIMESTAMPTZ). Its
native physical type (`timestamp with time zone`) is asserted port-
independently in migrations/asset-native-column-types.yaml. Here it is seeded
recordedAt is a plain field.timestamp column — instant / tz-aware BY DEFAULT
(ADR-0036 Wave 2), so it is TIMESTAMPTZ. Its native physical type (`timestamp
with time zone`) is asserted port-independently in
migrations/asset-native-column-types.yaml. Here it is seeded
at exact-UTC instants and asserted in the canonical UTC Z form per
normalization.md. observedAt/asOfDate/atTime are the @required temporal
columns on Asset (full wire-type coverage lives in normalization-wire-types.yaml).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ description: |
- id (uuid PK): NOT supplied on insert; gen_random_uuid() fills it, the
runtime returns it, and the read-back is by that generated PK — so a
server-generated PK is exercised on the write path too.
- temporal: tsVal (TIMESTAMP, no Z) + tsTzVal (TIMESTAMPTZ, always Z) +
- temporal: tsVal (field.timestamp @localTime → TIMESTAMP, no Z) + tsTzVal
(plain field.timestamp → TIMESTAMPTZ, tz-aware by default, always Z) +
timeVal (TIME) carry millisecond components; the whole-second omit-the-dot
rule is proven by the second query (a row with no sub-second part).
- float/double: in-band dyadic non-integers (1.5 / 0.125) so every port
Expand Down
1 change: 1 addition & 0 deletions fixtures/registry-conformance/coverage-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
"untestedAttrs": [
"column",
"db.indexed",
"dbColumnType",
"default",
"example",
"instruction",
Expand Down
Loading
Loading