Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d3fe878
Remove mappings, top-level relations, and old model field types from …
wmadden Apr 1, 2026
aaf7530
Remove mappings/relations generation from SQL emitter
wmadden Apr 1, 2026
7b41589
Remove as Record<string, ...> casts on contract.models in ORM client
wmadden Apr 1, 2026
5246a11
Update sql-contract, emitter, and contract-ts tests for removed fields
wmadden Apr 1, 2026
855a12c
Remove mappings and top-level relations from all test fixtures
wmadden Apr 1, 2026
81b2e24
Fix SqlMappings type references and update generated contract.d.ts files
wmadden Apr 1, 2026
d5ccd57
Update JSON fixtures, demo, ORM tests, and mongo for removed contract…
wmadden Apr 1, 2026
68c4e2a
Populate model-level domain fields and strip top-level relations from…
wmadden Apr 1, 2026
ad7111d
Update authoring layer for storage.fields model structure
wmadden Apr 1, 2026
66027cc
Update emitter to read column mappings from model.storage.fields
wmadden Apr 1, 2026
a37f958
Re-introduce modelOf helper for type-safe ORM model access
wmadden Apr 1, 2026
c6f37f2
Update remaining test fixtures and expected outputs for M4 changes
wmadden Apr 1, 2026
9c6eaa1
Restore model-to-storage cross-validation and strict schema mode
wmadden Apr 1, 2026
1225569
Remove top-level relations from builder output and simplify normalize…
wmadden Apr 1, 2026
626c551
Remove dead BuildRelations and ExtractModelRelations types
wmadden Apr 1, 2026
0195c60
Align BuildModels fields/relations types with DomainModel shape
wmadden Apr 1, 2026
ce92a4a
Update docs to reference current types after M4 cleanup
wmadden Apr 1, 2026
37a54d6
Update tests for removal of top-level relations and mappings
wmadden Apr 1, 2026
3eb2e24
Export modelOf helper from collection-contract
wmadden Apr 1, 2026
6f22509
Fix CI: update test fixtures for new contract shape, improve domain c…
wmadden Apr 1, 2026
d388323
Propagate codecId/nullable from storage fields to domain fields in mo…
wmadden Apr 1, 2026
f98230b
Make model-level relations optional in ModelSchema
wmadden Apr 1, 2026
3ba1a3e
Replace non-null assertions with Map lookups in validate-domain
wmadden Apr 1, 2026
171a346
Fix mongo type errors after rebase: make relations optional in schema…
wmadden Apr 2, 2026
48cc515
remove legacy top-level relations? from SqlContractSchema
wmadden Apr 2, 2026
fadf485
always emit nullable on domain fields
wmadden Apr 2, 2026
b314604
remove unnecessary optional chaining on model in validate-domain
wmadden Apr 2, 2026
a519f11
add nullable: false to ContractView test fixtures
wmadden Apr 2, 2026
79dd90a
fix FK validation to use localFields/targetFields
wmadden Apr 2, 2026
6f33855
fix test fixtures for nullable emission and FK field name changes
wmadden Apr 2, 2026
7bb8fcc
strip legacy top-level fields in normalizeContract instead of spreadi…
wmadden Apr 2, 2026
a46d591
regenerate demo contract artifacts without top-level relations
wmadden Apr 2, 2026
3e7d885
update contract-with-relations.json fixture to ADR 172 format
wmadden Apr 2, 2026
8a8003d
update stale .d.ts fixtures to new SqlContract type parameter layout
wmadden Apr 2, 2026
09e8d25
remove top-level relations from canonicalization types and output
wmadden Apr 2, 2026
3ea26f0
remove stale top-level contract.relations reference from PSL README
wmadden Apr 2, 2026
b55d674
use normalized domain shape in model-validation test fixtures
wmadden Apr 2, 2026
5be9c7c
use non-null assertions after existence checks in validate-domain
wmadden Apr 2, 2026
58873be
remove top-level relations from emitter validation, schema, and tests
wmadden Apr 2, 2026
9bf9433
remove old { column } field shape from emitter fallback and ORM compa…
wmadden Apr 2, 2026
e953a3d
reject old parentCols/childCols relation format in validator and JSON…
wmadden Apr 2, 2026
6820793
remove top-level relations from Mongo schema and fixtures
wmadden Apr 2, 2026
56f8075
strip legacy relations and mappings from migration fixture contracts
wmadden Apr 2, 2026
db9d37b
remove dead old-to-new field transform from emitter toDomainModel
wmadden Apr 2, 2026
9b8a6be
update 4 stale JSON fixtures to current contract schema
wmadden Apr 2, 2026
9eaeb09
fix JSON schema description and error on malformed relation on blocks
wmadden Apr 2, 2026
1114713
fix: address R6 review findings — update stale fixture, rename extens…
wmadden Apr 2, 2026
a848818
fix: remove non-null assertions in validate-domain.ts
wmadden Apr 2, 2026
6da70ac
style: auto-format migration fixture JSON files (biome)
wmadden Apr 2, 2026
163e63f
update M4 code review and reorder M3 follow-up tasks
wmadden Apr 2, 2026
19449b3
Mark completed tasks in plan (M1, M2, M4)
wmadden Apr 2, 2026
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
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ See [`architecture.config.json`](./architecture.config.json) for the complete do
### SQL Family Domain

- **`@prisma-next/sql-contract-ts`** — SQL-specific TypeScript contract authoring surface
- **`@prisma-next/sql-contract`** — SQL-specific contract types (`SqlContract`, `SqlStorage`, `SqlMappings`)
- **`@prisma-next/sql-contract`** — SQL-specific contract types (`SqlContract`, `SqlStorage`, `SqlModelStorage`)
- **`@prisma-next/sql-operations`** — SQL-specific operation definitions and assembly
- **`@prisma-next/sql-contract-emitter`** — SQL emitter hook implementation
- **`@prisma-next/sql-relational-core`** — Schema and column builders, operation attachment, and AST types
Expand Down
1 change: 0 additions & 1 deletion examples/mongo-demo/scripts/generate-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const blogIR: ContractIR = {
storage: { collection: 'posts' },
},
},
relations: {},
storage: {
collections: {
users: {},
Expand Down
1 change: 0 additions & 1 deletion examples/mongo-demo/src/contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
}
}
},
"relations": {},
"storage": {
"collections": {
"posts": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -95,8 +93,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -95,8 +93,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -124,8 +122,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -144,8 +142,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -144,8 +142,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -227,8 +225,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -286,8 +284,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -95,8 +93,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -124,8 +122,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -95,8 +93,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -248,8 +246,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -277,8 +275,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -248,8 +246,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -95,8 +93,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -95,8 +93,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -115,8 +113,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -144,8 +142,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -144,8 +142,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down Expand Up @@ -135,8 +133,6 @@
}
},
"models": {},
"relations": {},
"mappings": {},
"capabilities": {},
"extensionPacks": {},
"meta": {},
Expand Down
Loading
Loading