Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

Add db verify schema CLI command - #10

Merged
wmadden merged 13 commits into
mainfrom
db-verify-schema
Nov 14, 2025
Merged

wmadden merged 13 commits into
mainfrom
db-verify-schema

Conversation

@wmadden

@wmadden wmadden commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@wmadden
wmadden merged commit 300d393 into main Nov 14, 2025
@aqrln
aqrln deleted the db-verify-schema branch December 15, 2025 13:54
wmadden added a commit that referenced this pull request Mar 30, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
wmadden added a commit that referenced this pull request Mar 30, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
wmadden added a commit that referenced this pull request Mar 30, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
wmadden added a commit that referenced this pull request Mar 30, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
wmadden added a commit that referenced this pull request Mar 31, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
wmadden added a commit that referenced this pull request Mar 31, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
jkomyno pushed a commit that referenced this pull request Apr 1, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
jkomyno pushed a commit that referenced this pull request Apr 1, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
wmadden added a commit that referenced this pull request Apr 27, 2026
…on API

- spec FR4.1-4.4: standardise root accessors on lowercased plurals
  (db.orm.users / db.orm.posts) per the emitter output, drop the
  db.transaction(...) runtime requirement, and rewrite FR4.4 so it
  documents the replica-set requirement and points at TML-2313 as the
  owner of both the API and dev-environment provisioning.
- spec acceptance criteria: switch the Mongo facade-parity AC to
  db.orm.users.where(...).first() and the transaction line to a
  documentation-only requirement linking TML-2313.
- spec Decisions: rewrite #1 to capture the emitter-driven root
  convention; add #10 recording that the transaction API is deferred
  end-to-end to TML-2313.
- plan M3 task list: replace the db.transaction implementation task with
  the documentation task, mention binding-mirror connection inputs, and
  align the type-chain task and E2E task with the new accessor names.
wmadden added a commit that referenced this pull request Apr 27, 2026
…on API

- spec FR4.1-4.4: standardise root accessors on lowercased plurals
  (db.orm.users / db.orm.posts) per the emitter output, drop the
  db.transaction(...) runtime requirement, and rewrite FR4.4 so it
  documents the replica-set requirement and points at TML-2313 as the
  owner of both the API and dev-environment provisioning.
- spec acceptance criteria: switch the Mongo facade-parity AC to
  db.orm.users.where(...).first() and the transaction line to a
  documentation-only requirement linking TML-2313.
- spec Decisions: rewrite #1 to capture the emitter-driven root
  convention; add #10 recording that the transaction API is deferred
  end-to-end to TML-2313.
- plan M3 task list: replace the db.transaction implementation task with
  the documentation task, mention binding-mirror connection inputs, and
  align the type-chain task and E2E task with the new accessor names.
wmadden added a commit that referenced this pull request May 4, 2026
…on API

- spec FR4.1-4.4: standardise root accessors on lowercased plurals
  (db.orm.users / db.orm.posts) per the emitter output, drop the
  db.transaction(...) runtime requirement, and rewrite FR4.4 so it
  documents the replica-set requirement and points at TML-2313 as the
  owner of both the API and dev-environment provisioning.
- spec acceptance criteria: switch the Mongo facade-parity AC to
  db.orm.users.where(...).first() and the transaction line to a
  documentation-only requirement linking TML-2313.
- spec Decisions: rewrite #1 to capture the emitter-driven root
  convention; add #10 recording that the transaction API is deferred
  end-to-end to TML-2313.
- plan M3 task list: replace the db.transaction implementation task with
  the documentation task, mention binding-mirror connection inputs, and
  align the type-chain task and E2E task with the new accessor names.
wmadden added a commit that referenced this pull request May 8, 2026
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.

The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.

This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
jkomyno added a commit that referenced this pull request May 8, 2026
* #7 — SQLite AFTER-trigger mitigation: decision recorded as defer.
  JSDoc on buildRowIdentityCriterion + Query Lanes.md paragraph remain
  the documented mitigation; no runtime guard added until the SQLite
  adapter actually exercises id-less + AFTER-trigger contracts.

* #8 — Asymmetric `returning` gate: comment at executeUpdateCount
  records the explicit design choice. Surface-level updateCount/
  deleteCount require the capability; FK-rewrite cleanup
  (disconnect/setNull) does not, since no row data is read.

* #9 — Trim WHAT-restating sentence from buildRowIdentityCriterion
  comment block. Remaining lines explain the genuinely non-obvious
  WHY: RETURNING-by-construction invariant + duplicate-tuple caveat
  + SQLite AFTER-trigger caveat.

* #10 — Add typed `withoutPrimaryKey<TTable>(contract, table)` helper
  to test/helpers.ts mirroring `withCapabilities`. Migrate four call
  sites (createIdlessTagsCollection, createIdlessUsersCollection, two
  unit tests in mutation-executor.test.ts) from inline
  `as unknown as TestContract` casts to the helper. Cast lives in one
  place now.

* #11 — Drop redundant `updateCount returns zero` integration test
  on id-less Tags. The zero-match path is already covered by unit
  tests on PK contracts and does not exercise id-less specifics.

* #12 — Extract `getPrimaryKeyColumns(contract, tableName): readonly
  string[]` helper in collection-contract.ts. Replaces three
  duplicated raw-storage accesses (resolvePrimaryKeyColumn,
  pickCountReturningColumn, buildRowIdentityCriterion, the new P1
  guard).

* #13 — Plan doc references the post-rename name throughout.

* #14 — Trim `resolvePrimaryKeyColumn` error to one sentence; the
  API guidance prose duplicated content already in Query Lanes.md.

All 8 P3 todos marked complete. pnpm test:packages 110/110 green;
pnpm lint:deps 0 violations. sql-orm-client suite is 501 (one fewer
than before due to dropped redundant test).
wmadden added a commit that referenced this pull request May 9, 2026
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.

The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.

This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
wmadden added a commit that referenced this pull request May 9, 2026
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.

The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.

This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
wmadden added a commit that referenced this pull request May 9, 2026
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.

The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.

This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
wmadden added a commit that referenced this pull request May 9, 2026
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.

The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.

This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
wmadden added a commit that referenced this pull request May 19, 2026
…ions

Adds step 4.5 to drive-close-project (and the supporting pattern
catalogue + pitfalls) so close-out catches files whose content is
methodology but whose voice is project-shaping -- the failure mode
that produced our own close-outs cruft.

The trial-period finding under drive/project/findings.md records the
specific gap surfaced by closing out drive-domain-model:

  - problem-statement.md migrated as long-lived (it was a proposal
    letter to canonical maintainers).
  - skill-conventions.md migrated as long-lived (it was titled "Skill
    restructuring plan" and described what we changed, not the
    resulting conventions).
  - workflow.md migrated with "Bold = new (this project adds it)"
    framing baked in -- meaningless to a fresh reader.
  - definition-of-ready.md and definition-of-done.md migrated with
    "Worked example for prisma-next:" sections that duplicate
    overlays already lifted into drive/<category>/README.md.
  - trial.md migrated as long-lived despite documenting a specific
    2026-05-19 -> 2026-06-02 window.

What the skill update adds:

1. Step 4.5 -- prose audit on every long-lived candidate. Four smell
   tests: project-shaping voice in headings / prose; status blocks
   tied to project lifecycle; worked-example pollution duplicating
   project-context; worked examples anchored to specific real-world
   incidents. Each match yields a per-file disposition: rewrite-at-
   migration, lift-example-to-context, soften-at-migration, or
   reclassify-as-transient.

2. Step 5 confirmation extended to cover the disposition (the
   operator signs off on the disposition, not just the
   classification).

3. Step 6 migration extended to apply dispositions
   (rewrite / lift / soften instead of bare git mv where the audit
   matched).

4. Default classification table extended:
     - *-restructure.md / migration-plan.md / *-changes.md -> transient
       (execution plans describing project deltas).
     - problem-statement.md / pitch.md / proposal.md / motivation.md
       -> transient (project-shaping / advocacy artefacts).
     - trial.md / validation.md / rollout.md -> transient
       (time-windowed execution artefacts).
     - principles/**, model.md, workflow.md, *-conventions.md flagged
       "long-lived (prose-audit at step 4.5)" -- still long-lived by
       default, audit catches the exceptions.

5. Three new pitfalls (#8, #9, #10) covering the three audit-caught
   failure modes.

6. Checklist updated to require dispositions recorded + operator
   confirmation covering them.

Slices A + B (separate commits) apply the audit to the existing
docs/drive/ tree and clear the cruft this same finding surfaced.

Linked issue: TML-2549. Trial-period finding contributes to TML-2567
upstream-PR synthesis.

Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 19, 2026
…ions

Adds step 4.5 to drive-close-project (and the supporting pattern
catalogue + pitfalls) so close-out catches files whose content is
methodology but whose voice is project-shaping -- the failure mode
that produced our own close-outs cruft.

The trial-period finding under drive/project/findings.md records the
specific gap surfaced by closing out drive-domain-model:

  - problem-statement.md migrated as long-lived (it was a proposal
    letter to canonical maintainers).
  - skill-conventions.md migrated as long-lived (it was titled "Skill
    restructuring plan" and described what we changed, not the
    resulting conventions).
  - workflow.md migrated with "Bold = new (this project adds it)"
    framing baked in -- meaningless to a fresh reader.
  - definition-of-ready.md and definition-of-done.md migrated with
    "Worked example for prisma-next:" sections that duplicate
    overlays already lifted into drive/<category>/README.md.
  - trial.md migrated as long-lived despite documenting a specific
    2026-05-19 -> 2026-06-02 window.

What the skill update adds:

1. Step 4.5 -- prose audit on every long-lived candidate. Four smell
   tests: project-shaping voice in headings / prose; status blocks
   tied to project lifecycle; worked-example pollution duplicating
   project-context; worked examples anchored to specific real-world
   incidents. Each match yields a per-file disposition: rewrite-at-
   migration, lift-example-to-context, soften-at-migration, or
   reclassify-as-transient.

2. Step 5 confirmation extended to cover the disposition (the
   operator signs off on the disposition, not just the
   classification).

3. Step 6 migration extended to apply dispositions
   (rewrite / lift / soften instead of bare git mv where the audit
   matched).

4. Default classification table extended:
     - *-restructure.md / migration-plan.md / *-changes.md -> transient
       (execution plans describing project deltas).
     - problem-statement.md / pitch.md / proposal.md / motivation.md
       -> transient (project-shaping / advocacy artefacts).
     - trial.md / validation.md / rollout.md -> transient
       (time-windowed execution artefacts).
     - principles/**, model.md, workflow.md, *-conventions.md flagged
       "long-lived (prose-audit at step 4.5)" -- still long-lived by
       default, audit catches the exceptions.

5. Three new pitfalls (#8, #9, #10) covering the three audit-caught
   failure modes.

6. Checklist updated to require dispositions recorded + operator
   confirmation covering them.

Slices A + B (separate commits) apply the audit to the existing
docs/drive/ tree and clear the cruft this same finding surfaced.

Linked issue: TML-2549. Trial-period finding contributes to TML-2567
upstream-PR synthesis.

Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 19, 2026
…ions

Adds step 4.5 to drive-close-project (and the supporting pattern
catalogue + pitfalls) so close-out catches files whose content is
methodology but whose voice is project-shaping -- the failure mode
that produced our own close-outs cruft.

The trial-period finding under drive/project/findings.md records the
specific gap surfaced by closing out drive-domain-model:

  - problem-statement.md migrated as long-lived (it was a proposal
    letter to canonical maintainers).
  - skill-conventions.md migrated as long-lived (it was titled "Skill
    restructuring plan" and described what we changed, not the
    resulting conventions).
  - workflow.md migrated with "Bold = new (this project adds it)"
    framing baked in -- meaningless to a fresh reader.
  - definition-of-ready.md and definition-of-done.md migrated with
    "Worked example for prisma-next:" sections that duplicate
    overlays already lifted into drive/<category>/README.md.
  - trial.md migrated as long-lived despite documenting a specific
    2026-05-19 -> 2026-06-02 window.

What the skill update adds:

1. Step 4.5 -- prose audit on every long-lived candidate. Four smell
   tests: project-shaping voice in headings / prose; status blocks
   tied to project lifecycle; worked-example pollution duplicating
   project-context; worked examples anchored to specific real-world
   incidents. Each match yields a per-file disposition: rewrite-at-
   migration, lift-example-to-context, soften-at-migration, or
   reclassify-as-transient.

2. Step 5 confirmation extended to cover the disposition (the
   operator signs off on the disposition, not just the
   classification).

3. Step 6 migration extended to apply dispositions
   (rewrite / lift / soften instead of bare git mv where the audit
   matched).

4. Default classification table extended:
     - *-restructure.md / migration-plan.md / *-changes.md -> transient
       (execution plans describing project deltas).
     - problem-statement.md / pitch.md / proposal.md / motivation.md
       -> transient (project-shaping / advocacy artefacts).
     - trial.md / validation.md / rollout.md -> transient
       (time-windowed execution artefacts).
     - principles/**, model.md, workflow.md, *-conventions.md flagged
       "long-lived (prose-audit at step 4.5)" -- still long-lived by
       default, audit catches the exceptions.

5. Three new pitfalls (#8, #9, #10) covering the three audit-caught
   failure modes.

6. Checklist updated to require dispositions recorded + operator
   confirmation covering them.

Slices A + B (separate commits) apply the audit to the existing
docs/drive/ tree and clear the cruft this same finding surfaced.

Linked issue: TML-2549. Trial-period finding contributes to TML-2567
upstream-PR synthesis.

Signed-off-by: Will Madden <[email protected]>
paulwer pushed a commit to paulwer/prisma-next that referenced this pull request Jul 12, 2026
…substrate; delete workspace (prisma#867)

## Linked issue

Close-out of [Marker/ledger via typed query
AST](https://linear.app/prisma-company/project/markerledger-via-typed-query-ast-dc62ab25d151).
Phase-2 op porting + the project's deferred ADR migrate into the new
project [Typed DDL migration ops — complete the
conversion](https://linear.app/prisma-company/project/typed-ddl-migration-ops-complete-the-conversion-9a86e44d4c38)
(TML-2919/2920/2921/2922/2923/2925/2927/2866).

## At a glance

```
137 files changed, 9067 deletions(-)
```

Removes `projects/migrate-marker-ledger-to-typed-query-ast-commands/`
after the final retro, and migrates the durable design notes (the seven
design principles, the DDL visitor + dispatch model, the table-level
constraint shape, the codec-handling split, the planner-lowering
mechanism, the Mongo runner-boundary lowering) into the successor
project's workspace as draft material for **TML-2923**'s ADR. No
source-code changes. External-reference scan was clean before the
delete.

The design notes land at
[`projects/typed-ddl-migration-ops/typed-ddl-design-notes.md`](projects/typed-ddl-migration-ops/typed-ddl-design-notes.md)
— the workspace of the successor "Typed DDL migration ops" project,
whose `spec.md`/`plan.md` arrive on `main` with PR
[prisma#840](prisma#840) (in flight). The
notes are voice-rewritten to strip the project-shaping framing (the
close-out workflow's Step 4.5 disposition) and banner-marked as
draft-for-TML-2923 — its ADR slice absorbs/replaces this file when it
lands.

## Decision

Project closes; workspace is deleted. The project's DoD is met or
explicitly-deferred-with-ticket:

1. All 11 slices merged.
2. Final retro recorded (commit `36279033f` immediately preceding the
delete).
3. Long-lived methodology — the seven design principles + the
DDL-as-target-contributed-AST model + the table-constraint shape +
codec-handling split + planner lowering mechanism — migrated to the
successor project's workspace as draft material that TML-2923's ADR
absorbs. The canonical ADR ("DDL as a target-contributed query-AST kind
+ adapter DDL-lowering seam") + Adapters & Targets / Migration System
subsystem-doc updates are owned by TML-2923 in the successor project,
where the dust from Phase-2's remaining design decisions has to settle
first.
4. No external references to the project dir; nothing to re-point or
remove.

## Project DoD verification (acceptance criteria in
[spec.md](https://github.com/prisma/prisma-next/blob/fbcda64af/projects/migrate-marker-ledger-to-typed-query-ast-commands/spec.md))

| AC | Status | Evidence |
|---|---|---|
| Team-DoD floor | ✅ met | repo-wide gates green on every merged slice;
Linear close-out via this PR; ADR audit covered by AC prisma#9 (deferred) |
| SQL query AST represents `CREATE TABLE` + `CREATE SCHEMA` as
target-contributed nodes | ✅ met | Slice 1 (TML-2761, foundational) —
merged |
| All in-scope marker/ledger ops execute via `adapter.lower()` → driver;
zero `db.collection()` in `marker-ledger.ts` | ✅ met | Slice 2 (TML-2753
SQL) + Slice 3 (TML-2825 Mongo) — both merged |
| Each family's marker CRUD behind one control-adapter SPI; duplicate
read paths + `parseContractMarkerRow` + raw-SQL write builders collapsed
| ✅ met | TML-2753 outcome (sql-marker-ops-through-adapter) |
| `SqlControlAdapter` exposes marker-write methods symmetric with
`MongoControlAdapter` | ✅ met | TML-2753 |
| Contract-free construction surface per family; no in-scope op
hand-builds nodes by object literal or concatenates raw SQL | ✅ met |
TML-2761 (SQL DDL surface) + TML-2825 corrective round 2 (Mongo).
Phase-2 op-porting tracked by TML-2919/2920/2921/2922 in the successor
project. |
| Two `as` casts in Mongo `marker-ledger.ts` eliminated; cast ratchet
not regressed | ✅ met | TML-2825 |
| Invariant-merge converges on accumulate-dedupe across PG + SQLite;
test pins for both dialects | ✅ met | TML-2753 |
| Migration planner adopts typed AST across all three targets (or
residual deferred with tracked follow-ups) | ✅ met | Phase 1 closed:
Slice 5 SQLite ([prisma#768](prisma#768) /
TML-2859), Slice 7 PG ALTER
([prisma#813](prisma#813)), Slice 6 Mongo
([prisma#816](prisma#816) / TML-2888).
Residual op-porting deferred to the successor project. |
| ADR "DDL as a target-contributed query-AST kind + adapter DDL-lowering
seam" + subsystem-doc updates (Adapters & Targets, Migration System) | 🟡
partially met | Durable design notes migrated to
[`projects/typed-ddl-migration-ops/typed-ddl-design-notes.md`](projects/typed-ddl-migration-ops/typed-ddl-design-notes.md)
as draft material; canonical ADR + subsystem-doc updates owned by
**TML-2923** in the successor project, where the dust from Phase-2's
remaining design decisions has to settle first. |

## Slices merged in this project

| Slice | Linear | PR |
|---|---|---|
| `ddl-in-query-ast` (foundational) | TML-2761 | merged |
| `sql-marker-ops-through-adapter` | TML-2753 | merged |
| `mongo-marker-ledger-through-adapter` | TML-2825 | merged |
| `planner-create-table-adopts-ddl-ast` | TML-2754 |
[prisma#751](prisma#751) |
| `codec-routed-ddl-defaults` | TML-2867 |
[prisma#794](prisma#794) |
| `sqlite-create-table-adoption` (Phase 1) | TML-2859 |
[prisma#768](prisma#768) |
| `pg-add-column-pioneer` (Phase 1) | — |
[prisma#813](prisma#813) |
| `mongo-planner-create-collection-and-index-adoption` (Phase 1) |
TML-2888 | [prisma#816](prisma#816) |
| `typed-migration-verification-queries` | TML-2889 |
[prisma#825](prisma#825) |
| `un-namespaced-pg-defaults-to-public` | TML-2916 |
[prisma#838](prisma#838) |
| `pg-addcolumn-opid-and-codecref-roundtrip` | TML-2918 |
[prisma#837](prisma#837) |

## What follows in the successor project

[Typed DDL migration ops — complete the
conversion](https://linear.app/prisma-company/project/typed-ddl-migration-ops-complete-the-conversion-9a86e44d4c38)
owns:

- **TML-2919** (in flight as
[prisma#840](prisma#840)) — PG: remaining
raw-SQL op-builders → typed DDL; delete `buildAddColumnSql`.
- **TML-2920** — PG: model `CREATE EXTENSION` as first-class entity
kind.
- **TML-2921** — SQLite: convert op execute steps to typed DDL.
- **TML-2922** — SQLite: `RecreateTable` + AST growth (`CASE WHEN`,
row-tuple `IN`).
- **TML-2866** — SQLite inline-autoincrement: stop smuggling column
options through `DdlColumn.type`.
- **TML-2923** — ADR + subsystem docs (the deferred AC prisma#10 from this
project).
- **TML-2925** — Rewrite `dataTransform` op factory: defer lowering,
type the EXISTS wrapper.
- **TML-2927** — Introduce `PostgresTableRef` end-to-end (typed table
refs).

## Reviewer notes

- **Deletion is the only behavioral change** — 56 files removed, 5087
deletions, zero additions outside the final retro. Source code,
fixtures, examples, and tests are untouched.
- **External-reference scan was empty** before delete (`rg -l
"projects/migrate-marker-ledger-to-typed-query-ast-commands/" --glob
'!projects/migrate-marker-ledger-to-typed-query-ast-commands/**' --glob
'!.git/**'` returned no matches). No links to re-point.
- **The two commits are intentionally split** (`docs(marker-ledger):
final close-out retro` then `chore: close out … — delete workspace`) so
the final retro is preserved as a tracked commit on `main` for
archeology if anyone later asks "how did Phase 2 get extracted out
cleanly?"
- **The migrated doc is *draft material*, not a finished ADR.** The
design notes capture the steady-state architecture (the principles, the
visitor/dispatch model, the constraint shape, the codec split, the
lowering mechanism); they live in the successor project's workspace
alongside its `spec.md`/`plan.md`, where TML-2923's ADR slice
absorbs/replaces it. Writing the canonical ADR here, before the
remaining Phase-2 design decisions (TML-2919/2920/2921/2922) land, would
produce a doc that drifts within weeks.
- **The doc lands on `main` before the successor project's workspace
does** (TML-2919/prisma#840 also creates `projects/typed-ddl-migration-ops/`
but is in flight). If this PR merges first, my commit creates the dir;
if prisma#840 merges first, my file lands next to its spec/plan. Either order
works.

## Testing performed

- Worktree gates not re-run for a delete-only PR; the merged slices each
shipped with their own gate runs.
- `rg` reference scan confirmed pre-delete.

## Skill update

n/a — internal project workspace removal.

## Checklist

- [x] All commits signed off (DCO).
- [x] Scoped to one logical concern (project close-out).
- [x] Tests are updated — `n/a` (delete-only, no behavioral change).
- [x] PR title in `<TICKET-or-scope>: <sentence-case title>` form.
- [x] **Skill update** filled in (`n/a`).

---------

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant