From b8ebbeb4cf9945d847b052c58ed16ebbac93ba8e Mon Sep 17 00:00:00 2001 From: willbot Date: Sun, 22 Nov 2026 09:13:16 +1100 Subject: [PATCH 01/13] The migration statements spec states its purpose and its rule about refusals in plain words Signed-off-by: willbot Signed-off-by: Will Madden --- projects/migration-statements/spec.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/migration-statements/spec.md b/projects/migration-statements/spec.md index 6603c7b15683..a43d1f4ec595 100644 --- a/projects/migration-statements/spec.md +++ b/projects/migration-statements/spec.md @@ -6,7 +6,12 @@ The migration planner diffs two states and cannot tell intent from the diff. A renamed model looks exactly like a dropped table plus a created one, and a removed model looks the same as one the user forgot. Today the planner plans the destruction and relies on a blanket consent prompt, or on a hand-written migration, to keep rows safe. Projects that use `db update` and keep no migration history cannot hand-write anything. -This project makes two things true. The planner refuses any operation that loses data unless the user has said what they mean about that operation. And the user says it on the command line, in the vocabulary of their contract, as a statement the planner acts on: a rename, a deletion, a conversion or a backfill. Nothing is inferred, nothing is asked, and nothing is written into the contract source. +This project makes two things true. + +1. **A command that would lose data stops first.** `migration plan` and `db update` do not drop a table, drop a column, or change a type in a way that loses values until the user has told the command what they intend. +2. **The user tells it with a flag that uses the names in their contract.** `--rename Profile:User` means the model was renamed, so keep its rows. `--delete Legacy` means the model is gone, so drop its rows. `--convert User.age` and `--backfill User.email` say the user will write how the values change. The flags name models and fields, never tables or columns. + +The command never guesses what the user intended, and nothing about intent is written into the contract source. In a terminal the command asks. In a script it stops with an error that prints the flags. This is the second attempt. The first stated intent in the contract source with `@@hint(was:)` and was shelved on 2026-10-05 as unintuitive. Its planner substrate is reused; its contract section is not. @@ -83,7 +88,7 @@ The reasoning and the alternatives rejected are in [`design-notes.md`](./design- 1. **Statements are the only source of intent.** The planner never infers a rename, never asks whether a drop is one, and never reads intent from the contract. A change with no statement is planned as the diff shows it, and refused if that loses data. 2. **Contract vocabulary only.** A statement names namespaces, models, fields and values as the contract source names them. The framework resolves every coordinate against the origin and destination contracts before any family code runs; the family receives resolved entities, never names to look up. 3. **One statement surface, both commands.** `migration plan` and `db update` accept the same statements with the same meaning, and the plan a statement produces is the same whichever command ran it. `db update` obtains its origin contract from the marker hash through the snapshot store. -4. **Refusal names the way out.** When either command refuses, the error lists every destructive operation with the rename and delete statements that would resolve it, spelled exactly as the user would type them. In a terminal the same list is the consent question, asked per operation. +4. **When a command stops, its error prints the flags that let it continue.** For each thing that would lose data, the error says what would be lost and prints each flag that answers it, written exactly as the user would type it, such as `--delete Legacy`. A user can copy a flag from the error, run the command again, and it works. In a terminal the command asks the same thing as a question, once for each thing that would lose data. 5. **An unusable statement is an error.** A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found. Running the same statements twice fails the second time. 6. **Statements compose in order.** Each statement is applied to the working copy of the origin before the next is resolved, so `--rename Profile:User --rename User.name:User.fullName` is valid and the second statement uses the new table name. A swap is refused with a message. 7. **Same output as the hand-written route.** A plan produced from statements writes a `migration.ts` whose calls a user could have written by hand, and re-running that file reproduces `ops.json`. Statements are never recorded anywhere; the migration file is the record. From cf4d8d5feda065d0fa106484ca535f5ef6a851fe Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 09:51:31 +1100 Subject: [PATCH 02/13] When migration plan or db update cannot ask a statement question, the refusal now leads with the question itself (engine 0.10.1) Signed-off-by: willbot Signed-off-by: Will Madden --- apps/lsp-playground/package.json | 2 +- apps/telemetry-backend/package.json | 2 +- examples/bundle-size/package.json | 2 +- examples/mongo-blog-leaderboard/package.json | 2 +- examples/mongo-demo/package.json | 2 +- .../multi-extension-monorepo/package.json | 2 +- examples/paradedb-demo/package.json | 2 +- .../prisma-8-cloudflare-worker/package.json | 2 +- examples/prisma-8-demo-mariadb/package.json | 2 +- examples/prisma-8-demo-mysql/package.json | 2 +- examples/prisma-8-demo-sqlite/package.json | 2 +- examples/prisma-8-demo/package.json | 2 +- examples/prisma-8-postgis-demo/package.json | 2 +- examples/prisma7-adoption/package.json | 2 +- examples/react-router-demo/package.json | 2 +- examples/retail-store/package.json | 2 +- examples/supabase/package.json | 2 +- .../1-framework/3-tooling/cli/package.json | 4 +- .../cli/src/orm/plan-question-prompt.ts | 12 +- .../cli/test/orm/plan-question-prompt.test.ts | 48 +++++- .../3-tooling/config-loader/package.json | 4 +- packages/3-extensions/citext/package.json | 2 +- packages/3-extensions/paradedb/package.json | 2 +- packages/3-extensions/pgvector/package.json | 2 +- packages/3-extensions/postgis/package.json | 2 +- packages/3-extensions/supabase/package.json | 2 +- .../mysql/1-mysql/9-facade/package.json | 2 +- .../mysql/2-mariadb/9-facade/package.json | 2 +- .../3-targets/mysql/3-live-tests/package.json | 2 +- .../@prisma/orm-toolchain/package.json | 2 +- pnpm-lock.yaml | 149 ++++++++---------- test/e2e/framework/test/fixtures/package.json | 2 +- .../test/sqlite/fixtures/package.json | 2 +- test/integration/package.json | 2 +- ...ete-statements-migration.mongo.e2e.test.ts | 2 +- .../enum-value-statements.mongo.e2e.test.ts | 6 +- ...rename-delete-statements.mongo.e2e.test.ts | 2 +- .../stored-name-chains-and-merges.e2e.test.ts | 8 +- ...-name-chains-and-merges.sqlite.e2e.test.ts | 8 +- .../stored-name-db-update.e2e.test.ts | 4 +- .../stored-name-db-update.sqlite.e2e.test.ts | 4 +- .../cli-journeys/table-map-change.e2e.test.ts | 4 +- .../table-map-change.sqlite.e2e.test.ts | 8 +- .../value-object-backfill.mongo.e2e.test.ts | 9 +- .../value-object-statements.e2e.test.ts | 2 +- .../value-object-statements.mongo.e2e.test.ts | 5 +- ...value-object-statements.sqlite.e2e.test.ts | 2 +- .../variant-storage-moves.e2e.test.ts | 14 +- .../variant-storage-moves.sqlite.e2e.test.ts | 14 +- .../cli/cli-e2e-test-app/package.json | 2 +- .../cli/cli-integration-test-app/package.json | 2 +- .../cli-engine-0-10-1/app/instructions.md | 35 ++++ .../extension/instructions.md | 35 ++++ 53 files changed, 272 insertions(+), 169 deletions(-) create mode 100644 upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md create mode 100644 upgrade-instructions/pending/cli-engine-0-10-1/extension/instructions.md diff --git a/apps/lsp-playground/package.json b/apps/lsp-playground/package.json index 1629cbbf522f..0a03ed71dd24 100644 --- a/apps/lsp-playground/package.json +++ b/apps/lsp-playground/package.json @@ -35,7 +35,7 @@ "ws": "^8.21.2" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/apps/telemetry-backend/package.json b/apps/telemetry-backend/package.json index 90f6bf09ed84..a84ac4d5cb7a 100644 --- a/apps/telemetry-backend/package.json +++ b/apps/telemetry-backend/package.json @@ -27,7 +27,7 @@ "evlog": "^2.24.0" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/compute-sdk": "^0.43.0", "@prisma/management-api-sdk": "^1.76.0", "@repo/prisma-bin": "workspace:8.0.0-rc.24", diff --git a/examples/bundle-size/package.json b/examples/bundle-size/package.json index f207f9721b25..2dda6abef39e 100644 --- a/examples/bundle-size/package.json +++ b/examples/bundle-size/package.json @@ -28,7 +28,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/dev": "catalog:", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", diff --git a/examples/mongo-blog-leaderboard/package.json b/examples/mongo-blog-leaderboard/package.json index af40cddbc7b8..6f178495271f 100644 --- a/examples/mongo-blog-leaderboard/package.json +++ b/examples/mongo-blog-leaderboard/package.json @@ -19,7 +19,7 @@ "mongodb": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/mongo-demo/package.json b/examples/mongo-demo/package.json index 3f29caaab038..db3634656a4b 100644 --- a/examples/mongo-demo/package.json +++ b/examples/mongo-demo/package.json @@ -24,7 +24,7 @@ "react-dom": "^19.3.1" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/multi-extension-monorepo/package.json b/examples/multi-extension-monorepo/package.json index c9eb40b29e8b..9c2bea17ff92 100644 --- a/examples/multi-extension-monorepo/package.json +++ b/examples/multi-extension-monorepo/package.json @@ -18,7 +18,7 @@ "@prisma/orm-postgres": "workspace:8.0.0-rc.24" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/paradedb-demo/package.json b/examples/paradedb-demo/package.json index 99d35ca821ea..c5eaf442f0a4 100644 --- a/examples/paradedb-demo/package.json +++ b/examples/paradedb-demo/package.json @@ -25,7 +25,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/prisma-8-cloudflare-worker/package.json b/examples/prisma-8-cloudflare-worker/package.json index 7a4dc428b1e3..9ef1ec6b5c42 100644 --- a/examples/prisma-8-cloudflare-worker/package.json +++ b/examples/prisma-8-cloudflare-worker/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@cloudflare/vitest-pool-workers": "0.20.3", "@cloudflare/workers-types": "5.20260804.1", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo-mariadb/package.json b/examples/prisma-8-demo-mariadb/package.json index 68a16c2668bd..946d9af30729 100644 --- a/examples/prisma-8-demo-mariadb/package.json +++ b/examples/prisma-8-demo-mariadb/package.json @@ -20,7 +20,7 @@ "@prisma/orm-mariadb": "workspace:8.0.0-rc.24" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo-mysql/package.json b/examples/prisma-8-demo-mysql/package.json index 81e0f5d05958..d14006ca5c82 100644 --- a/examples/prisma-8-demo-mysql/package.json +++ b/examples/prisma-8-demo-mysql/package.json @@ -20,7 +20,7 @@ "@prisma/orm-mysql": "workspace:8.0.0-rc.24" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo-sqlite/package.json b/examples/prisma-8-demo-sqlite/package.json index d85bd3120070..7ee0850ddbd5 100644 --- a/examples/prisma-8-demo-sqlite/package.json +++ b/examples/prisma-8-demo-sqlite/package.json @@ -21,7 +21,7 @@ "dotenv": "^17.4.2" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo/package.json b/examples/prisma-8-demo/package.json index 7598b1ebcf2a..1c2c7c2bd050 100644 --- a/examples/prisma-8-demo/package.json +++ b/examples/prisma-8-demo/package.json @@ -32,7 +32,7 @@ "react-dom": "^19.3.1" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/dev": "catalog:", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", diff --git a/examples/prisma-8-postgis-demo/package.json b/examples/prisma-8-postgis-demo/package.json index 64a1cdd06321..fb7afbe69a33 100644 --- a/examples/prisma-8-postgis-demo/package.json +++ b/examples/prisma-8-postgis-demo/package.json @@ -33,7 +33,7 @@ "react-leaflet": "^5.0.0" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/prisma7-adoption/package.json b/examples/prisma7-adoption/package.json index 9c1bad1bf3ac..926466b22254 100644 --- a/examples/prisma7-adoption/package.json +++ b/examples/prisma7-adoption/package.json @@ -29,7 +29,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/dev": "catalog:", "@prisma/prisma7": "7.10.0", "@repo/test-utils": "workspace:8.0.0-rc.24", diff --git a/examples/react-router-demo/package.json b/examples/react-router-demo/package.json index b3ee2e554583..b242ea3928ff 100644 --- a/examples/react-router-demo/package.json +++ b/examples/react-router-demo/package.json @@ -30,7 +30,7 @@ "react-router": "^8.3.1" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/dev": "catalog:", "@react-router/dev": "^8.3.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", diff --git a/examples/retail-store/package.json b/examples/retail-store/package.json index 2be4f0f2cd31..ab91e13b0983 100644 --- a/examples/retail-store/package.json +++ b/examples/retail-store/package.json @@ -39,7 +39,7 @@ "tailwindcss": "^4.3.5" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/supabase/package.json b/examples/supabase/package.json index 2275cc5d992f..b9067bfc92de 100644 --- a/examples/supabase/package.json +++ b/examples/supabase/package.json @@ -18,7 +18,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/packages/1-framework/3-tooling/cli/package.json b/packages/1-framework/3-tooling/cli/package.json index 3d981b95f517..2efd679cd347 100644 --- a/packages/1-framework/3-tooling/cli/package.json +++ b/packages/1-framework/3-tooling/cli/package.json @@ -52,7 +52,7 @@ "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", "@internal/sql-operations": "workspace:8.0.0-rc.24", "@internal/sql-runtime": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", @@ -63,7 +63,7 @@ "vitest": "catalog:" }, "peerDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "typescript": ">=5.9" }, "peerDependenciesMeta": { diff --git a/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts b/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts index b1f4442597f1..4cff86cf4397 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts @@ -147,15 +147,11 @@ function ledByKeepDataWays(error: unknown, questions: readonly PlanQuestion[]): ), ]; if (ways.length === 0) return error; - return new CliStructuredError(error.code, error.message, { + const withoutWays = (text: string) => + ways.reduce((rest, way) => rest.replaceAll(` ${way}`, '').replaceAll(`\n${way}`, ''), text); + return new CliStructuredError(error.code, withoutWays(error.message), { severity: error.severity, - ...ifDefined( - 'why', - ways.reduce( - (why, way) => why?.replaceAll(` ${way}`, '').replaceAll(`\n${way}`, ''), - error.why, - ), - ), + ...ifDefined('why', error.why === undefined ? undefined : withoutWays(error.why)), nextActions: [...ways.map(chooseAction), ...error.nextActions], diagnostics: error.diagnostics, ...ifDefined('where', error.where), diff --git a/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts b/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts index 5b612609e48e..2eec163309c3 100644 --- a/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts +++ b/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts @@ -178,7 +178,7 @@ describe('a namespace answer typed at the prompt', () => { const prompt = { statements: vi.fn(async (questions: readonly { readonly subject: string }[]) => { asked.push(questions.map(({ subject }) => subject)); - throw Object.assign(new Error('needs a statement'), { + throw Object.assign(new Error('3 choices are needed, and this run cannot ask you.'), { code: 'CLI.CONSENT_REQUIRED', unanswered: questions.map(({ subject }) => subject), }); @@ -380,8 +380,8 @@ describe('a refusal to answer a question that names ways to keep the data', () = }; const prompt = { statements: vi.fn(async () => { - throw new CliStructuredError('CLI.CONSENT_REQUIRED', '"Status.DONE" needs a statement.', { - why: kept.question, + throw new CliStructuredError('CLI.CONSENT_REQUIRED', kept.question, { + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', label: 'Run the command again with --delete Status.DONE' }, ], @@ -396,8 +396,8 @@ describe('a refusal to answer a question that names ways to keep the data', () = await expect(promptPlanQuestions(prompt, statements)([kept])).rejects.toMatchObject({ code: 'CLI.CONSENT_REQUIRED', - message: '"Status.DONE" needs a statement.', - why: 'Remove value "done" would lose enum value "Status.DONE".', + message: 'Remove value "done" would lose enum value "Status.DONE".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', label: way }, { kind: 'user-choice', label: 'Run the command again with --delete Status.DONE' }, @@ -405,6 +405,44 @@ describe('a refusal to answer a question that names ways to keep the data', () = meta: { unanswered: [{ subject: 'Status.DONE', verbs: ['delete'] }] }, }); }); + + it('removes those ways from each question it lists when several are unanswered', async () => { + const way = 'To keep it, plan the change with `prisma migration plan`.'; + const keptQuestion = (value: string): PlanQuestion => ({ + ...question(`Status.${value}`), + question: `Remove value "${value}" would lose enum value "Status.${value}". ${way}`, + keepDataWays: [way], + }); + const done = keptQuestion('DONE'); + const open = keptQuestion('OPEN'); + const prompt = { + statements: vi.fn(async () => { + throw new CliStructuredError( + 'CLI.CONSENT_REQUIRED', + '2 choices are needed, and this run cannot ask you.', + { + why: `${done.question}\n${open.question}`, + meta: { + unanswered: [ + { subject: 'Status.DONE', verbs: ['delete'] }, + { subject: 'Status.OPEN', verbs: ['delete'] }, + ], + }, + }, + ); + }), + } as unknown as PromptSurface; + const statements: StatementSurface = { + take: vi.fn(() => []) as StatementSurface['take'], + values: () => [], + }; + + await expect(promptPlanQuestions(prompt, statements)([done, open])).rejects.toMatchObject({ + message: '2 choices are needed, and this run cannot ask you.', + why: 'Remove value "DONE" would lose enum value "Status.DONE".\nRemove value "OPEN" would lose enum value "Status.OPEN".', + nextActions: [{ kind: 'user-choice', label: way }], + }); + }); }); describe('a --delete for a subject answered without asking', () => { diff --git a/packages/1-framework/3-tooling/config-loader/package.json b/packages/1-framework/3-tooling/config-loader/package.json index 31df73fd1c76..f3a09de612e3 100644 --- a/packages/1-framework/3-tooling/config-loader/package.json +++ b/packages/1-framework/3-tooling/config-loader/package.json @@ -26,7 +26,7 @@ "tinyglobby": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", @@ -36,7 +36,7 @@ "vitest": "catalog:" }, "peerDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "typescript": ">=5.9" }, "peerDependenciesMeta": { diff --git a/packages/3-extensions/citext/package.json b/packages/3-extensions/citext/package.json index f4e8a30d2f14..731faad87a26 100644 --- a/packages/3-extensions/citext/package.json +++ b/packages/3-extensions/citext/package.json @@ -32,7 +32,7 @@ "@internal/postgres": "workspace:8.0.0-rc.24", "@internal/postgres-codec-testkit": "workspace:8.0.0-rc.24", "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/paradedb/package.json b/packages/3-extensions/paradedb/package.json index fcb4414193e5..6ccb3f55676f 100644 --- a/packages/3-extensions/paradedb/package.json +++ b/packages/3-extensions/paradedb/package.json @@ -34,7 +34,7 @@ "@internal/operations": "workspace:8.0.0-rc.24", "@internal/sql-contract-psl": "workspace:8.0.0-rc.24", "@internal/target-postgres": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/pgvector/package.json b/packages/3-extensions/pgvector/package.json index d1fb64fef54f..01fff6cd3c60 100644 --- a/packages/3-extensions/pgvector/package.json +++ b/packages/3-extensions/pgvector/package.json @@ -39,7 +39,7 @@ "@internal/postgres": "workspace:8.0.0-rc.24", "@internal/postgres-codec-testkit": "workspace:8.0.0-rc.24", "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/postgis/package.json b/packages/3-extensions/postgis/package.json index 8c90a03b84c2..2822fc17e50a 100644 --- a/packages/3-extensions/postgis/package.json +++ b/packages/3-extensions/postgis/package.json @@ -37,7 +37,7 @@ "@internal/operations": "workspace:8.0.0-rc.24", "@internal/postgres": "workspace:8.0.0-rc.24", "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/supabase/package.json b/packages/3-extensions/supabase/package.json index a2c7cefdc3c7..d7c6b33a454b 100644 --- a/packages/3-extensions/supabase/package.json +++ b/packages/3-extensions/supabase/package.json @@ -47,7 +47,7 @@ "@internal/operations": "workspace:8.0.0-rc.24", "@internal/psl-printer": "workspace:8.0.0-rc.24", "@internal/sql-contract-psl": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-targets/mysql/1-mysql/9-facade/package.json b/packages/3-targets/mysql/1-mysql/9-facade/package.json index 899c9d0872a0..14590bc9cadf 100644 --- a/packages/3-targets/mysql/1-mysql/9-facade/package.json +++ b/packages/3-targets/mysql/1-mysql/9-facade/package.json @@ -45,7 +45,7 @@ "@internal/migration-tools": "workspace:8.0.0-rc.24", "@internal/psl-parser": "workspace:8.0.0-rc.24", "@internal/sql-schema-ir": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-targets/mysql/2-mariadb/9-facade/package.json b/packages/3-targets/mysql/2-mariadb/9-facade/package.json index f5493f974ed8..c5e86c3ad3cc 100644 --- a/packages/3-targets/mysql/2-mariadb/9-facade/package.json +++ b/packages/3-targets/mysql/2-mariadb/9-facade/package.json @@ -42,7 +42,7 @@ "@internal/framework-components": "workspace:8.0.0-rc.24", "@internal/migration-tools": "workspace:8.0.0-rc.24", "@internal/sql-schema-ir": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-targets/mysql/3-live-tests/package.json b/packages/3-targets/mysql/3-live-tests/package.json index efafa41672a5..444acb7fe661 100644 --- a/packages/3-targets/mysql/3-live-tests/package.json +++ b/packages/3-targets/mysql/3-live-tests/package.json @@ -30,7 +30,7 @@ "@internal/sql-runtime": "workspace:8.0.0-rc.24", "@internal/target-mariadb": "workspace:8.0.0-rc.24", "@internal/target-mysql": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "temporal-polyfill": "^1.0.8", diff --git a/packages/9-public/@prisma/orm-toolchain/package.json b/packages/9-public/@prisma/orm-toolchain/package.json index 9df5febaf955..e8cfb897b9a8 100644 --- a/packages/9-public/@prisma/orm-toolchain/package.json +++ b/packages/9-public/@prisma/orm-toolchain/package.json @@ -49,7 +49,7 @@ "typescript": "catalog:" }, "peerDependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "typescript": ">=5.9", "vite": "^7.0.0 || ^8.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 431f3266f407..993724603cce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -198,8 +198,8 @@ importers: version: 8.21.3 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -238,8 +238,8 @@ importers: version: 2.24.0(express@5.2.1)(hono@4.11.4)(next@16.4.6(@types/node@26.1.2)(react-dom@19.3.1(react@19.3.1))(react@19.3.1))(react-router@8.5.2(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1))(react@19.3.1)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/compute-sdk': specifier: ^0.43.0 version: 0.43.0(@prisma/management-api-sdk@1.76.0)(encoding@0.1.13)(rollup@4.59.0) @@ -296,8 +296,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -351,8 +351,8 @@ importers: version: 7.5.0(socks@2.8.9) devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -397,8 +397,8 @@ importers: version: 19.3.1(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -446,8 +446,8 @@ importers: version: link:../../packages/9-public/@prisma/orm-postgres devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -486,8 +486,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -535,8 +535,8 @@ importers: specifier: 5.20260804.1 version: 5.20260804.1 '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -590,8 +590,8 @@ importers: version: 19.3.1(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -654,8 +654,8 @@ importers: version: link:../../packages/9-public/@prisma/orm-mariadb devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -679,8 +679,8 @@ importers: version: link:../../packages/9-public/@prisma/orm-mysql devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -710,8 +710,8 @@ importers: version: 17.4.2 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -765,8 +765,8 @@ importers: version: 5.0.0(leaflet@1.9.4)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -823,8 +823,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -887,8 +887,8 @@ importers: version: 8.5.2(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -996,8 +996,8 @@ importers: version: 4.3.5 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -1048,8 +1048,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -1529,8 +1529,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../2-sql-family/5-runtime '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../test/utils @@ -1669,8 +1669,8 @@ importers: version: 0.2.17 devDependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../test/utils @@ -3267,8 +3267,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-ts '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3368,8 +3368,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../3-targets/postgres/1-target '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3456,8 +3456,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-ts '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3538,8 +3538,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-ts '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3723,8 +3723,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-psl '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -4408,8 +4408,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../2-sql-family/1-core/schema-ir '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../../test/utils @@ -4631,8 +4631,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../2-sql-family/1-core/schema-ir '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../../test/utils @@ -4703,8 +4703,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../1-mysql/1-target '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../test/utils @@ -6524,8 +6524,8 @@ importers: packages/9-public/@prisma/orm-toolchain: dependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-framework': specifier: workspace:8.0.0-rc.24 version: link:../orm-framework @@ -6685,8 +6685,8 @@ importers: test/e2e/framework/test/fixtures: dependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-extension-arktype-json': specifier: workspace:8.0.0-rc.24 version: link:../../../../../packages/9-public/@prisma/orm-extension-arktype-json @@ -6703,8 +6703,8 @@ importers: test/e2e/framework/test/sqlite/fixtures: dependencies: '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-sqlite': specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/9-public/@prisma/orm-sqlite @@ -6902,8 +6902,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../packages/0-shared/publish-surface '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../utils @@ -7034,8 +7034,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/1-framework/0-foundation/utils '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-extension-pgvector': specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/9-public/@prisma/orm-extension-pgvector @@ -7109,8 +7109,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/1-framework/0-foundation/utils '@prisma/cli-engine': - specifier: 0.10.0 - version: 0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.1 + version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-extension-pgvector': specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/9-public/@prisma/orm-extension-pgvector @@ -8834,8 +8834,8 @@ packages: '@prisma/adapter-pg@7.10.1': resolution: {integrity: sha512-EP9ruPYHjKP80WZlb5qVaEXKgZjJieBFjAxcBtQnDAHD6+16UN4keVmBh6L/RUpuDQT2FQRbvKNgq5d4Ix+IkQ==} - '@prisma/cli-engine@0.10.0': - resolution: {integrity: sha512-GdeeXQg5dmlY5aBX+coqtO8AbUwszGL/Sa9z5NcRQkUKIS7hk4EBG8mhwZFN9dKOVwahw7e9dWfpM7skl2MyGg==} + '@prisma/cli-engine@0.10.1': + resolution: {integrity: sha512-PeowmWlUzgfm1R2wIzkqjG+1E/0vEyEMuqZBDObnfsrtJ0JBiYXROM3MXhFBF1QNTr9zWjxCYlljiMBjtyk1dA==} engines: {node: '>=22.12.0'} peerDependencies: '@prisma/management-api-sdk': ^1.55.0 @@ -12643,10 +12643,6 @@ packages: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} - string-width@8.2.2: - resolution: {integrity: sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==} - engines: {node: '>=20'} - string-width@8.3.0: resolution: {integrity: sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==} engines: {node: '>=20'} @@ -14685,7 +14681,7 @@ snapshots: transitivePeerDependencies: - pg-native - '@prisma/cli-engine@0.10.0(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4)': + '@prisma/cli-engine@0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4)': dependencies: '@clack/prompts': 1.5.0 '@prisma/management-api-sdk': 1.76.0 @@ -14694,7 +14690,7 @@ snapshots: c12: 3.3.4(magicast@0.5.4) colorette: 2.0.20 package-manager-detector: 1.8.0 - string-width: 8.2.2 + string-width: 8.3.0 transitivePeerDependencies: - magicast @@ -18308,11 +18304,6 @@ snapshots: get-east-asian-width: 1.6.0 strip-ansi: 7.2.0 - string-width@8.2.2: - dependencies: - get-east-asian-width: 1.6.0 - strip-ansi: 7.2.0 - string-width@8.3.0: dependencies: get-east-asian-width: 1.6.0 diff --git a/test/e2e/framework/test/fixtures/package.json b/test/e2e/framework/test/fixtures/package.json index b187cf904c37..2638965eb9c4 100644 --- a/test/e2e/framework/test/fixtures/package.json +++ b/test/e2e/framework/test/fixtures/package.json @@ -5,7 +5,7 @@ "version": "8.0.0-rc.24", "description": "The Postgres fixture of the e2e suite. Its own manifest because emission reads the nearest one to decide which package names generated files import, and this suite exercises two databases whose halves must not name each other's facade.", "dependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/orm-extension-arktype-json": "workspace:8.0.0-rc.24", "@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.24", "@prisma/orm-postgres": "workspace:8.0.0-rc.24", diff --git a/test/e2e/framework/test/sqlite/fixtures/package.json b/test/e2e/framework/test/sqlite/fixtures/package.json index fee79cdab274..5d5a3277c264 100644 --- a/test/e2e/framework/test/sqlite/fixtures/package.json +++ b/test/e2e/framework/test/sqlite/fixtures/package.json @@ -5,7 +5,7 @@ "version": "8.0.0-rc.24", "description": "The SQLite fixture of the e2e suite. Its own manifest because emission reads the nearest one to decide which package names generated files import, and this suite exercises two databases whose halves must not name each other's facade.", "dependencies": { - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/orm-sqlite": "workspace:8.0.0-rc.24" } } diff --git a/test/integration/package.json b/test/integration/package.json index 936ada298501..3918ef788da5 100644 --- a/test/integration/package.json +++ b/test/integration/package.json @@ -89,7 +89,7 @@ "@internal/middleware-cache": "workspace:8.0.0-rc.24", "@internal/mongo-lowering": "workspace:8.0.0-rc.24", "@internal/publish-surface": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts b/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts index 4b420605ccb1..14e923dac6b3 100644 --- a/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts @@ -339,7 +339,7 @@ describe('Journeys (MongoDB): statements that consent to data loss', { /dropCollection\(['"]events|createCollection\(['"]occasions/, ); writeFileSync(migrationTs, edited, 'utf-8'); - const emitted = runPrintedSelfEmit(String(engineError(asked)?.why), dirname(migrationTs)); + const emitted = runPrintedSelfEmit(String(engineError(asked)?.summary), dirname(migrationTs)); expect(emitted.exitCode, `S5.09: node on migration.ts, as printed: ${emitted.stderr}`).toBe(0); const applyRemap = await runMigrate(ctx); expect(applyRemap.exitCode, `S5.10: migrate: ${applyRemap.stderr}`).toBe(0); diff --git a/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts b/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts index 082413933b0c..56796acb3982 100644 --- a/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts @@ -548,7 +548,7 @@ describe('Journeys (MongoDB): enum value statements', { await emit(ctx, chained, 'E7.03'); const asked = await runDbUpdate(ctx, ['--no-interactive', '--json']); - expect(engineError(asked)?.why).toContain( + expect(engineError(asked)?.summary).toContain( 'If "Status.ARCHIVED" is now "Status.RETIRED", add --rename Status.ARCHIVED:Status.RETIRED, and the next question says how to keep the data of both.', ); const renamed = await runDbUpdate(ctx, [ @@ -558,12 +558,12 @@ describe('Journeys (MongoDB): enum value statements', { '--json', ]); expect({ - why: engineError(renamed)?.why, + summary: engineError(renamed)?.summary, twoRuns: (engineError(renamed)?.nextActions ?? []) .map(({ label }) => label) .filter((label) => label.startsWith('To keep it with db update')), }).toEqual({ - why: [ + summary: [ 'These operations would lose enum value "Status.ACTIVE" from the data that holds it:', '- Remove value "active" from field status of collection users', '- Remove value "active" from field tags of collection users', diff --git a/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts b/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts index f4e61592c5ac..5e61a97a5d04 100644 --- a/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts @@ -321,7 +321,7 @@ describe('Journeys (MongoDB): --rename and --delete', { const printed = printedFlags(refused, 'delete'); expect(printed, 'R3.04: named by its collection').toEqual(['--delete', 'profiles.nickname']); expect( - String(engineError(refused)?.why) + String(engineError(refused)?.summary) .split('\n') .map((line) => line.slice(0, 3)), 'R3.04: the question, then each way to keep the data on a line of its own', diff --git a/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts index dd950703ec64..6e3ba23dd857 100644 --- a/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts @@ -221,8 +221,9 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug" needs a statement, and the session is not interactive.', - why: 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', + summary: + 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', label: 'Run the command again with --rename Bug:Defect' }, { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, @@ -271,8 +272,7 @@ withTempDir(({ createTempDir }) => { expect(await refusal(journey, [], 'G2.03'), 'G2.03: the questions').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - '2 subjects need a statement, and the session is not interactive: "Bug", "Task".', + summary: '2 choices are needed, and this run cannot ask you.', why: `Drop table "bug" would lose the data of model "Bug". ${MERGE_ADVICE}\nDrop table "task" would lose the data of model "Task". ${MERGE_ADVICE}`, nextActions: [ { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, diff --git a/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts index 341828b01d72..57d01c3a78e6 100644 --- a/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts @@ -195,8 +195,9 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug" needs a statement, and the session is not interactive.', - why: 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', + summary: + 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', label: 'Run the command again with --rename Bug:Defect' }, { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, @@ -243,8 +244,7 @@ withTempDir(({ createTempDir }) => { expect(await refusal(journey, [], 'G2.03'), 'G2.03: the questions').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - '2 subjects need a statement, and the session is not interactive: "Bug", "Task".', + summary: '2 choices are needed, and this run cannot ask you.', why: `Drop table "bug" would lose the data of model "Bug". ${MERGE_ADVICE}\nDrop table "task" would lose the data of model "Task". ${MERGE_ADVICE}`, nextActions: [ { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, diff --git a/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts index 12896bfb6bdb..c157a131148a 100644 --- a/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts @@ -77,8 +77,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'D1.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"User.nick" needs a statement, and the session is not interactive.', - why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts index 45debb22cd39..99d62198b967 100644 --- a/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts @@ -75,8 +75,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'D1.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"User.nick" needs a statement, and the session is not interactive.', - why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/table-map-change.e2e.test.ts b/test/integration/test/cli-journeys/table-map-change.e2e.test.ts index a9ca20553570..592d54a566c3 100644 --- a/test/integration/test/cli-journeys/table-map-change.e2e.test.ts +++ b/test/integration/test/cli-journeys/table-map-change.e2e.test.ts @@ -165,8 +165,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'M4.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"User.nick" needs a statement, and the session is not interactive.', - why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts index 8c6ca54edf3e..062741b9ad91 100644 --- a/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts @@ -96,8 +96,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'M2.03: the question names User.score').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"User.score" needs a statement, and the session is not interactive.', - why: `Recreate table people would change the type of field "User.score" and can change or lose its values.${convert} --delete keeps the field and lets the database cast its values, which can change or lose some.`, + summary: `Recreate table people would change the type of field "User.score" and can change or lose its values.${convert} --delete keeps the field and lets the database cast its values, which can change or lose some.`, + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: verbs.map((verb) => ({ kind: 'user-choice', label: `Run the command again with --${verb} User.score`, @@ -167,8 +167,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'M4.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"User.nick" needs a statement, and the session is not interactive.', - why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts b/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts index 55c0dfca98eb..bb1e815e54f9 100644 --- a/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts @@ -371,11 +371,11 @@ describe('Journeys (MongoDB): required fields new inside value objects and embed const asked = engineError(await runMigrationPlan(ctx, [...from, '--json'])); expect({ code: asked?.code, - why: asked?.why, + summary: asked?.summary, answers: asked?.nextActions?.map(({ label }) => label), }).toEqual({ code: 'CLI.CONSENT_REQUIRED', - why: [ + summary: [ 'These operations would lose the values of value object field "Address.zip":', '- Remove key "zip" at path "$" in field home of collection users', '- Remove key "zip" at path "$[*]" in field addresses of collection users', @@ -428,7 +428,10 @@ describe('Journeys (MongoDB): required fields new inside value objects and embed '--json', ]), ); - expect(seen?.why, 'B3.11: a field with no temporary value still needs --backfill').toContain( + expect( + seen?.summary, + 'B3.11: a field with no temporary value still needs --backfill', + ).toContain( 'If you answer delete, the new required field "Address.seen" still needs a value: add --backfill Address.seen to write it in migration.ts.', ); }); diff --git a/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts index 5181b316c722..3a4d5523571f 100644 --- a/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts @@ -216,7 +216,7 @@ withTempDir(({ createTempDir }) => { const asked = await refusal(ctx, via, 'O1.04'); if (via === 'db update') { expect(asked, 'O1.04: one question, the rename offered').toContain( - '\\"GeoPoint.lat\\" needs a statement', + '"summary":"These operations would lose the values of value object field \\"GeoPoint.lat\\":', ); expect(asked, 'O1.04: what --delete leaves in the new field').toContain( 'the existing objects get a temporary value in the new required field \\"GeoPoint.latitude\\"', diff --git a/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts index 6ef76581bc04..7af7dce3bcdb 100644 --- a/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts @@ -354,8 +354,9 @@ describe('Journeys (MongoDB): renames and removals inside value objects and embe }).toEqual({ exitCode: 'failed', code: 'CLI.CONSENT_REQUIRED', - summary: '"Address.zip" needs a statement, and the session is not interactive.', - why: 'Remove key "zip" at path "$" in field home of collection users would lose the values of value object field "Address.zip".', + summary: + 'Remove key "zip" at path "$" in field home of collection users would lose the values of value object field "Address.zip".', + why: 'You have to choose what happens, and this run cannot ask you.', answers: [ "Run the command again with --rename 'Address.zip:Address.'", 'Run the command again with --delete Address.zip', diff --git a/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts index bbd8226c6d1b..f73dc1a7465d 100644 --- a/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts @@ -204,7 +204,7 @@ withTempDir(({ createTempDir }) => { const asked = await refusal(ctx, via, 'O1.04'); if (via === 'db update') { expect(asked, 'O1.04: one question, the rename offered').toContain( - '\\"GeoPoint.lat\\" needs a statement', + '"summary":"These operations would lose the values of value object field \\"GeoPoint.lat\\":', ); expect(asked, 'O1.04: what --delete leaves in the new field').toContain( 'the existing objects get a temporary value in the new required field \\"GeoPoint.latitude\\"', diff --git a/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts b/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts index 91fa639df119..25bf5a756051 100644 --- a/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts +++ b/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts @@ -117,8 +117,9 @@ withTempDir(({ createTempDir }) => { expect(asked, 'J1.03: the question names Bug.severity').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug.severity" needs a statement, and the session is not interactive.', - why: 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', + summary: + 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', @@ -168,8 +169,8 @@ withTempDir(({ createTempDir }) => { expect(askedBack, 'J1.07: the question names Bug').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug" needs a statement, and the session is not interactive.', - why: 'Drop table "bug" would lose the data of model "Bug".', + summary: 'Drop table "bug" would lose the data of model "Bug".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', @@ -235,8 +236,9 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug" needs a statement, and the session is not interactive.', - why: 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"', + summary: + 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts index 5e94195ff64a..cce78b526fe6 100644 --- a/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts @@ -112,8 +112,9 @@ withTempDir(({ createTempDir }) => { expect(asked, 'J1.03: the question names Bug.severity').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug.severity" needs a statement, and the session is not interactive.', - why: 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', + summary: + 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', @@ -159,8 +160,8 @@ withTempDir(({ createTempDir }) => { expect(askedBack, 'J1.07: the question names Bug').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug" needs a statement, and the session is not interactive.', - why: 'Drop table "bug" would lose the data of model "Bug".', + summary: 'Drop table "bug" would lose the data of model "Bug".', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', @@ -224,8 +225,9 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '"Bug" needs a statement, and the session is not interactive.', - why: 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"\nSQLite migrations run with foreign keys off, so deleting these rows does not delete the rows of "defect" that reference them: the apply then fails at PRAGMA foreign_key_check. Delete or change those rows first.', + summary: + 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"\nSQLite migrations run with foreign keys off, so deleting these rows does not delete the rows of "defect" that reference them: the apply then fails at PRAGMA foreign_key_check. Delete or change those rows first.', + why: 'You have to choose what happens, and this run cannot ask you.', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json b/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json index 36bb94caa49e..f42c46b1ce62 100644 --- a/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json +++ b/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json @@ -19,7 +19,7 @@ "@internal/target-mongo": "workspace:8.0.0-rc.24", "@internal/target-postgres": "workspace:8.0.0-rc.24", "@internal/utils": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.24", "@prisma/orm-mongo": "workspace:8.0.0-rc.24", "@prisma/orm-postgres": "workspace:8.0.0-rc.24", diff --git a/test/integration/test/fixtures/cli/cli-integration-test-app/package.json b/test/integration/test/fixtures/cli/cli-integration-test-app/package.json index 8f3abdc927dd..ef3a488b5496 100644 --- a/test/integration/test/fixtures/cli/cli-integration-test-app/package.json +++ b/test/integration/test/fixtures/cli/cli-integration-test-app/package.json @@ -20,7 +20,7 @@ "@internal/target-mongo": "workspace:8.0.0-rc.24", "@internal/target-postgres": "workspace:8.0.0-rc.24", "@internal/utils": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.0", + "@prisma/cli-engine": "0.10.1", "@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.24", "@prisma/orm-mongo": "workspace:8.0.0-rc.24", "@prisma/orm-postgres": "workspace:8.0.0-rc.24", diff --git a/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md new file mode 100644 index 000000000000..88b19992eb34 --- /dev/null +++ b/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md @@ -0,0 +1,35 @@ +--- +changes: + - id: engine-pin-moves-to-0-10-1 + summary: | + The toolchain now requires `@prisma/cli-engine@0.10.1` (up from 0.10.0). A project that depends on `@prisma/cli-engine` itself must move to `0.10.1`. + detection: + glob: "**/{package.json,pnpm-workspace.yaml}" + matches: + - '"@prisma/cli-engine":\s*"[^"]*(? Date: Mon, 23 Nov 2026 10:02:59 +1100 Subject: [PATCH 03/13] The upgrade note, spec, deferred list and one MongoDB journey now match the refusal text of engine 0.10.1 Signed-off-by: willbot Signed-off-by: Will Madden --- .../cli/src/orm/plan-question-prompt.ts | 2 +- projects/migration-statements/deferred.md | 43 ++++++++++++++++++- projects/migration-statements/spec.md | 6 +-- .../keep-documents-advice.mongo.e2e.test.ts | 2 +- .../cli-engine-0-10-1/app/instructions.md | 10 +++-- .../extension/instructions.md | 10 +++-- 6 files changed, 61 insertions(+), 12 deletions(-) diff --git a/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts b/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts index 4cff86cf4397..4b9c3cacb074 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts @@ -134,7 +134,7 @@ function unansweredSubjects(error: CliStructuredError): ReadonlySet | un /** * The engine's refusal to answer, led by the ways to keep the data that the unanswered questions - * name: the next actions give them first, so they are not repeated in why. + * name: the next actions give them first, so they are not repeated in the summary or why. */ function ledByKeepDataWays(error: unknown, questions: readonly PlanQuestion[]): unknown { if (!isConsentRequired(error) || !CliStructuredError.is(error)) return error; diff --git a/projects/migration-statements/deferred.md b/projects/migration-statements/deferred.md index 748029761a9b..e16c4eef1170 100644 --- a/projects/migration-statements/deferred.md +++ b/projects/migration-statements/deferred.md @@ -60,7 +60,26 @@ Adding a required field to a populated collection, or making an optional field r **Found:** slice 2 manual QA (2026-10-08), F11. Engine side. -`CLI.CONSENT_REQUIRED` lists one `user-choice` next action per flag form ("Run the command again with --delete Legacy", another for the rename form), not grouped by subject and not a complete runnable command, and its summary says "N subjects need a statement", which is project vocabulary. Grouping the forms per subject and printing a full command would need the engine to know the invocation; raise it on prisma/prisma-cli once the statement prompt has shipped. +`CLI.CONSENT_REQUIRED` lists one `user-choice` next action per flag form ("Run the command again with --delete Legacy", another for the rename form), not grouped by subject and not a complete runnable command. Grouping the forms per subject and printing a full command would need the engine to know the invocation; raise it on prisma/prisma-cli once the statement prompt has shipped. + +## A question of several lines becomes a first line of several lines, with its list at the left edge + +**Found:** review and manual QA of the move to `@prisma/cli-engine` 0.10.1 (2026-11-23). Engine side. + +From engine 0.10.1, when one question is left unanswered, the refusal's summary is the question itself. A question about several operations is a heading and a list (`plan-questions.ts` writes it that way, because the list is what the terminal prompt shows), so the summary is several lines. The engine prints the later lines of the summary at the left edge, while it indents the later lines of `why`. Manual QA on SQLite, removing the value object field `GeoPoint.lng`: + +```text +$ prisma db update --no-interactive +✘ [CLI.CONSENT_REQUIRED] These operations would lose the values of value object field "GeoPoint.lng": +- Remove key "lng" at path "$" in column "location" of "site" +- Remove key "lng" at path "$[*]" in column "history" of "site" +- Remove key "lng" at path "$.point" in column "place" of "site" + why: You have to choose what happens, and this run cannot ask you. +→ Run the command again with --rename 'GeoPoint.lng:GeoPoint.' +→ Run the command again with --delete GeoPoint.lng +``` + +The list looks like separate output, and the question seems to end before `why:`. This breaks the rule in `docs/CLI Style Guide.md` that an error's first line is a concise summary. Every fact and flag is still there. The fix belongs in the engine, which chose to put the question in the summary and owns the layout. Either indent the later lines of the summary as it already indents those of `why`, or make the summary only the question's first line and put the rest at the start of `why`. Flattening the question in the ORM would spoil the terminal prompt, where the list is the point. ## SQL variants stored in their own tables @@ -158,6 +177,7 @@ Everything the prompt adapter (`packages/1-framework/3-tooling/cli/src/orm/plan- - The one-question-at-a-time mode (`askOneAtATime`), used when a question is about a removed namespace, so a typed `delete billing` answers the rest of the namespace and a typed `rename billing:finance` leaves them open for the next round. - `isConsentRequired`, which catches the engine's `CLI.CONSENT_REQUIRED` for one question and asks the engine again with every open question, so its refusal names them all. - The `undefined` answer that `AnswerPlanQuestions` may return beside a `rename` or `convert` answer, and the `InternalError` in `checkAnswers` that guards it. +- `ledByKeepDataWays`, which removes the ways to keep the data from the question text in the refusal's summary and `why`, because it gives them first in the next actions. It goes once the engine's question has its own field for ways to keep the data, which the engine shows in the prompt and turns into next actions when it refuses. ## `SchemaTables` is asked about namespace ids of the origin contract @@ -509,3 +529,24 @@ It needs a decision: reject a column that fields of different enums share when t The origin stores `User` in `users` with primary key `users_pkey`; the destination stores it in `app_users`. The database also has a table the contract lacks, `stale`, with an index named `app_users_pkey`. The plan is: rename table `users` to `app_users`, rename `users_pkey` to `app_users_pkey`, drop table `stale`. The apply fails with `relation "app_users_pkey" already exists`, because the drop that frees the name runs last. Nothing is lost: the migration is rolled back. A `--rename` statement gave the same plan before this slice. The constraint rename is a companion inside the `renameTable` call, and running `migration.ts` again rebuilds the companions inside `this.renameTable(...)`, so it cannot simply move later in the plan. Two fixes: run a drop of a table no rename touches before the renames, or write that companion as its own call after the drop. This is a second case of the limit recorded under "A SQLite column rename followed by a table rebuild builds the replacement index twice": operations carry no dependency information. Until then the user drops the stale table first. + +## Problems found by manual QA on 2026-11-23 (engine 0.10.1) + +**Found:** manual QA of the move to `@prisma/cli-engine` 0.10.1 on SQLite (2026-11-23), run as a user who knows their models and fields. None is fixed. Each line says whether another entry already covers it. + +1. A value object field renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`: the first error says to add `--backfill GeoPoint.latitude`; the question that follows offers `--rename GeoPoint.lat:GeoPoint.latitude`; giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". That is false, since `latitude` is new; the real conflict is a rename and a backfill of the same field. New. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. +2. For that rename, `migration plan` first fails with "Migration planning failed" about the new required field, while `db update`, and `migration plan` on a model field, ask the question at once. The same change gives a different first error by command and by whether the field is in a model or a value object. Partly covered: "A value object field has no default, so `--backfill` has none to respect" explains why `migration plan` needs `--backfill`; the different first error is new. +3. With two models removed, the error prints four "Run the command again with …" lines as if any one were enough. The user needs one choice per model, and following one line refuses again for the other model. Covered by "The refusal's next actions are one line per flag, not grouped by subject". +4. A removed model or value object field with nothing to rename to is offered `--rename 'Comment:'` or `--rename 'GeoPoint.lng:GeoPoint.'`. The line cannot be run as printed, and run literally it fails with "has no field """. New. +5. A question about several operations prints its list at the left edge, under the error's first line and above the indented `why:`, so the list looks like separate output. Covered by "A question of several lines becomes a first line of several lines, with its list at the left edge". +6. When the run cannot ask, the question still says "If you answer delete, the existing objects get a temporary value …". There is nothing to answer; it should say "If you choose --delete GeoPoint.lat, …". The text comes from `plan-questions.ts`. New. +7. Value object locations are written as JSON paths and table names, such as `at path "$[*]" in column "history" of "site"`, where the user knows `Site.history`; "of "site"" does not even say it is a table. The planning failure lists the same places in a different order from the question. New. +8. A mistyped `--delete Nope.field` is reported only as "--delete Nope.field does not name User.name.". After the user adds the right flag and keeps the typo, a second error says "Remove the flag, or spell the subject the way the command names it." A mistyped `--rename` target, by contrast, is rejected at once with a clear reason. The typo should be reported in the first error. Partly covered: "Three texts the stored-name renames QA found outside its scope" covers the "spell the subject" wording; reporting the typo first is new. +9. On SQLite a removed field's question starts "Recreate table user would lose the values of field "User.name".". Recreating the table is how SQLite makes the change, not what the user did, and the table name is not quoted, while a dropped table is (`Drop table "comment"`). Partly covered: "SQLite operation labels do not quote names" covers the quoting; naming the user's change instead of SQLite's step is new. +10. One question puts the loss in the first line and "You have to choose what happens, and this run cannot ask you." under `why:`; several questions put "2 choices are needed, and this run cannot ask you." in the first line and the losses under `why:`. The same information sits under different labels. New, engine side. +11. Messages use project terms a user does not know: "origin contract", "destination contract", "destination value object", "statement" (as in `Cannot resolve statement "--rename …"`), "postchecks already held", "contract space(s)", "self-emit", "attest the package". A user thinks of the old schema, the new schema and the `--rename` flag. Partly covered: "Statement errors say "rows" on MongoDB" asks for one pass over the statement errors' wording, and "Three texts the stored-name renames QA found outside its scope" covers "the subject"; the rest is new. +12. After `--delete User.name` on SQLite, both commands say "Applied 1 of 2 operation(s) …; the other 1 had nothing to do, since their postchecks already held". "the other 1 … their" is ungrammatical, and the user is shown a `Drop column "name" from "user"` step that does nothing because the table recreate already removed the column. New. The text is in `applied-summary.ts`; "A SQLite column rename followed by a table rebuild builds the replacement index twice" is a similar extra step after a rebuild. +13. The DDL preview of that migration shows `CREATE TABLE "_prisma_new_user"`, `DROP TABLE "user"` and the rename, but not the `INSERT … SELECT` that copies the rows, so it reads as if every row is dropped. It then shows `DROP COLUMN "name"` on a table that no longer has that column. The data is in fact kept. Partly covered: "Three texts the stored-name renames QA found outside its scope" records that the DDL preview leaves out value rewrites; the missing row copy is the same fault, and the extra drop is problem 12. +14. After `db update --delete User.name`, the warning about the temporary value says "To choose the value, plan a migration with prisma migration plan --from 33a42cee… --backfill User.displayName instead.". The update has already run, so "instead" comes too late, and the user does not know or easily check a 64-character hash. The text is in `migration-blocks.ts`. New. +15. Under `--yes` the refusal says "You have to choose what happens, and --yes does not choose for you.", which is clear. A user may wonder whether to keep `--yes` when running the printed line again; keeping it works. New and minor. +16. In a terminal, `db update` prints each progress step twice, as a `▸` line and then a `✔` line, so four lines come before the error. `migration plan` prints none. New. diff --git a/projects/migration-statements/spec.md b/projects/migration-statements/spec.md index a43d1f4ec595..635130b0fd7a 100644 --- a/projects/migration-statements/spec.md +++ b/projects/migration-statements/spec.md @@ -8,8 +8,8 @@ The migration planner diffs two states and cannot tell intent from the diff. A r This project makes two things true. -1. **A command that would lose data stops first.** `migration plan` and `db update` do not drop a table, drop a column, or change a type in a way that loses values until the user has told the command what they intend. -2. **The user tells it with a flag that uses the names in their contract.** `--rename Profile:User` means the model was renamed, so keep its rows. `--delete Legacy` means the model is gone, so drop its rows. `--convert User.age` and `--backfill User.email` say the user will write how the values change. The flags name models and fields, never tables or columns. +1. **A command that would lose data stops first.** `migration plan` and `db update` stop before any change that would lose data, until the user has told the command what they intend. Dropping a table, dropping a column and changing a type in a way that loses values are examples. Removing an enum value or a value object field loses data too. +2. **The user tells it with a flag that uses the names in their contract.** `--rename Profile:User` means the model was renamed, so keep its rows. `--delete Legacy` means the model is gone, so drop its rows. `--convert User.age` and `--backfill User.email` say the user will write how the values change. The flags use the names in the user's contract: models, fields, enum values, value object fields and namespaces. A flag uses a table, collection or column name only for data that no model stores. The command never guesses what the user intended, and nothing about intent is written into the contract source. In a terminal the command asks. In a script it stops with an error that prints the flags. @@ -88,7 +88,7 @@ The reasoning and the alternatives rejected are in [`design-notes.md`](./design- 1. **Statements are the only source of intent.** The planner never infers a rename, never asks whether a drop is one, and never reads intent from the contract. A change with no statement is planned as the diff shows it, and refused if that loses data. 2. **Contract vocabulary only.** A statement names namespaces, models, fields and values as the contract source names them. The framework resolves every coordinate against the origin and destination contracts before any family code runs; the family receives resolved entities, never names to look up. 3. **One statement surface, both commands.** `migration plan` and `db update` accept the same statements with the same meaning, and the plan a statement produces is the same whichever command ran it. `db update` obtains its origin contract from the marker hash through the snapshot store. -4. **When a command stops, its error prints the flags that let it continue.** For each thing that would lose data, the error says what would be lost and prints each flag that answers it, written exactly as the user would type it, such as `--delete Legacy`. A user can copy a flag from the error, run the command again, and it works. In a terminal the command asks the same thing as a question, once for each thing that would lose data. +4. **When a command stops, its error prints the flags that let it continue.** For each thing that would lose data, the error says what would be lost and prints each flag that answers it, written exactly as the user would type it, such as `--delete Legacy`. When a flag needs a new name that the user must choose, such as the new name of a renamed field, the error says so. The user copies a flag from the error, fills in any new name, and runs the command again. In a terminal the command asks the same thing as a question, once for each thing that would lose data. 5. **An unusable statement is an error.** A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found. Running the same statements twice fails the second time. 6. **Statements compose in order.** Each statement is applied to the working copy of the origin before the next is resolved, so `--rename Profile:User --rename User.name:User.fullName` is valid and the second statement uses the new table name. A swap is refused with a message. 7. **Same output as the hand-written route.** A plan produced from statements writes a `migration.ts` whose calls a user could have written by hand, and re-running that file reproduces `ops.json`. Statements are never recorded anywhere; the migration file is the record. diff --git a/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts b/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts index 1cade1e8c2aa..20e7e8111e83 100644 --- a/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts @@ -92,7 +92,7 @@ describe('Journey (MongoDB): keeping the documents of a collection created only await emitFixture(project, 'contract-indexed-events-remapped.ts', 'K.04'); const asked = await runMigrationPlan(project, ['--from', origin, '--json']); expect(asked.exitCode, 'K.05: the drop of events needs a statement').toBe(2); - const question = String(engineError(asked)?.why); + const question = String(engineError(asked)?.summary); expect(question, 'K.05: the question says where the rename goes').toContain( 'make renameCollection("events", "occasions") the first operation, imported with the other operations, delete the drop of "events", and delete the create of "occasions" if there is one', ); diff --git a/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md index 88b19992eb34..fcc94f19479a 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md @@ -10,7 +10,7 @@ changes: - '[''"]?@prisma/cli-engine[''"]?:\s*[''"]?[\^~]?0\.(?:\d|10\.0)(?!\d)' - id: consent-required-summary-is-the-question summary: | - When `prisma migration plan` or `prisma db update` cannot ask a statement question, `CLI.CONSENT_REQUIRED` now has new text. With one question, its summary is the question itself; with several, the summary is `N choices are needed, and this run cannot ask you.` Code that matched the old summary text must match the new text, or read the error's code and `meta`. + When `prisma migration plan` or `prisma db update` cannot ask a statement question, `CLI.CONSENT_REQUIRED` now has new text. With one question, its summary is the question itself; with several, the summary is `N choices are needed, and this run cannot ask you.` Code that matched the old text, or read the question from `why`, must check the error's `code` and `meta.unanswered` instead. detection: glob: "**/*.{js,mjs,cjs,ts,mts,cts,sh,bash,yml,yaml}" matches: @@ -18,6 +18,9 @@ changes: - 'subjects? need a statement, and the session is not interactive' - 'needs a statement, which --yes cannot give' - 'need a statement, which --yes cannot give' + - 'answers no question; the questions are about' + - 'answers no consent in this run' + - 'CONSENT_REQUIRED' --- ## `engine-pin-moves-to-0-10-1` @@ -30,6 +33,7 @@ When `prisma migration plan` or `prisma db update` would lose data or change acc - One unanswered question: the summary was `"User.nick" needs a statement, and the session is not interactive.` and `why` held the question. Now the summary is the question, such as `Drop column "nick" from "people" would lose the values of field "User.nick".`, and `why` is `You have to choose what happens, and this run cannot ask you.` Under `--yes`, `why` is `You have to choose what happens, and --yes does not choose for you.` - Several unanswered questions: the summary was `2 subjects need a statement, and the session is not interactive: "Bug", "Task".` Now it is `2 choices are needed, and this run cannot ask you.` (under `--yes`, `2 choices are needed, and --yes does not choose for you.`). `why` still lists the questions, one per line. -- A flag that answers nothing is reported on a line of its own in `why`, now worded as `--delete Legcy does not name A or B.` and `--confirm tok does not choose what happens; --rename or --delete does.` +- When the question names ways to keep the data, those sentences are left out of the summary and given first in the next actions. +- A flag that answers nothing is reported on a line of its own in `why`. The old lines were `--delete Legcy answers no question; the questions are about A, B.` and `--confirm tok answers no consent in this run; a statement flag is what answers these questions.` They are now worded as `--delete Legcy does not name A or B.` and `--confirm tok does not choose what happens; --rename or --delete does.` -For every file matched by `detection`, stop matching the summary text. Check the error's `code` (`CLI.CONSENT_REQUIRED`) and read the subjects from `meta.unanswered` (each with its `subject` and `verbs`). Where code must read the question text, read it from the summary when `meta.unanswered` has one entry, and from `why` when it has several. +For every file matched by `detection`, stop reading the summary or `why` of this error. Branch on the error's `code` (`CLI.CONSENT_REQUIRED`) and read the unanswered questions from `meta.unanswered` (each with its `subject` and `verbs`). The summary and `why` are text for people, and their layout may change in any release. A file that only checks `code` needs no change. diff --git a/upgrade-instructions/pending/cli-engine-0-10-1/extension/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-1/extension/instructions.md index e93b0b770830..7c84ff50ed04 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-1/extension/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-1/extension/instructions.md @@ -10,7 +10,7 @@ changes: - '[''"]?@prisma/cli-engine[''"]?:\s*[''"]?[\^~]?0\.(?:\d|10\.0)(?!\d)' - id: consent-required-summary-is-the-question summary: | - When `prisma migration plan` or `prisma db update` cannot ask a statement question, `CLI.CONSENT_REQUIRED` now has new text. With one question, its summary is the question itself; with several, the summary is `N choices are needed, and this run cannot ask you.` Code that matched the old summary text must match the new text, or read the error's code and `meta`. + When `prisma migration plan` or `prisma db update` cannot ask a statement question, `CLI.CONSENT_REQUIRED` now has new text. With one question, its summary is the question itself; with several, the summary is `N choices are needed, and this run cannot ask you.` Code that matched the old text, or read the question from `why`, must check the error's `code` and `meta.unanswered` instead. detection: glob: "**/*.{js,mjs,cjs,ts,mts,cts,sh,bash,yml,yaml}" matches: @@ -18,6 +18,9 @@ changes: - 'subjects? need a statement, and the session is not interactive' - 'needs a statement, which --yes cannot give' - 'need a statement, which --yes cannot give' + - 'answers no question; the questions are about' + - 'answers no consent in this run' + - 'CONSENT_REQUIRED' --- ## `engine-pin-moves-to-0-10-1` @@ -30,6 +33,7 @@ When `prisma migration plan` or `prisma db update` would lose data or change acc - One unanswered question: the summary was `"User.nick" needs a statement, and the session is not interactive.` and `why` held the question. Now the summary is the question, such as `Drop column "nick" from "people" would lose the values of field "User.nick".`, and `why` is `You have to choose what happens, and this run cannot ask you.` Under `--yes`, `why` is `You have to choose what happens, and --yes does not choose for you.` - Several unanswered questions: the summary was `2 subjects need a statement, and the session is not interactive: "Bug", "Task".` Now it is `2 choices are needed, and this run cannot ask you.` (under `--yes`, `2 choices are needed, and --yes does not choose for you.`). `why` still lists the questions, one per line. -- A flag that answers nothing is reported on a line of its own in `why`, now worded as `--delete Legcy does not name A or B.` and `--confirm tok does not choose what happens; --rename or --delete does.` +- When the question names ways to keep the data, those sentences are left out of the summary and given first in the next actions. +- A flag that answers nothing is reported on a line of its own in `why`. The old lines were `--delete Legcy answers no question; the questions are about A, B.` and `--confirm tok answers no consent in this run; a statement flag is what answers these questions.` They are now worded as `--delete Legcy does not name A or B.` and `--confirm tok does not choose what happens; --rename or --delete does.` -For every file matched by `detection`, stop matching the summary text. Check the error's `code` (`CLI.CONSENT_REQUIRED`) and read the subjects from `meta.unanswered` (each with its `subject` and `verbs`). Where code must read the question text, read it from the summary when `meta.unanswered` has one entry, and from `why` when it has several. +For every file matched by `detection`, stop reading the summary or `why` of this error. Branch on the error's `code` (`CLI.CONSENT_REQUIRED`) and read the unanswered questions from `meta.unanswered` (each with its `subject` and `verbs`). The summary and `why` are text for people, and their layout may change in any release. A file that only checks `code` needs no change. From d27aba866f703463943e6b67de967c3a8eec6154 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:34:38 +1100 Subject: [PATCH 04/13] When migration plan or db update cannot ask a statement question, the refusal now starts "This command requires explicit consent" and keeps the question in why (engine 0.10.2) Moves @prisma/cli-engine to 0.10.2, which keeps the 0.10.0 refusal and changes only its first line. The prompt adapter and the journeys go back to reading the question from why, and the pending upgrade note now describes the change from 0.10.0 to 0.10.2. Signed-off-by: willbot Signed-off-by: Will Madden --- apps/lsp-playground/package.json | 2 +- apps/telemetry-backend/package.json | 2 +- examples/bundle-size/package.json | 2 +- examples/mongo-blog-leaderboard/package.json | 2 +- examples/mongo-demo/package.json | 2 +- .../multi-extension-monorepo/package.json | 2 +- examples/paradedb-demo/package.json | 2 +- .../prisma-8-cloudflare-worker/package.json | 2 +- examples/prisma-8-demo-mariadb/package.json | 2 +- examples/prisma-8-demo-mysql/package.json | 2 +- examples/prisma-8-demo-sqlite/package.json | 2 +- examples/prisma-8-demo/package.json | 2 +- examples/prisma-8-postgis-demo/package.json | 2 +- examples/prisma7-adoption/package.json | 2 +- examples/react-router-demo/package.json | 2 +- examples/retail-store/package.json | 2 +- examples/supabase/package.json | 2 +- .../1-framework/3-tooling/cli/package.json | 4 +- .../cli/src/orm/plan-question-prompt.ts | 14 +- .../cli/test/orm/plan-question-prompt.test.ts | 71 +++------ .../3-tooling/config-loader/package.json | 4 +- packages/3-extensions/citext/package.json | 2 +- packages/3-extensions/paradedb/package.json | 2 +- packages/3-extensions/pgvector/package.json | 2 +- packages/3-extensions/postgis/package.json | 2 +- packages/3-extensions/supabase/package.json | 2 +- .../mysql/1-mysql/9-facade/package.json | 2 +- .../mysql/2-mariadb/9-facade/package.json | 2 +- .../3-targets/mysql/3-live-tests/package.json | 2 +- .../@prisma/orm-toolchain/package.json | 2 +- pnpm-lock.yaml | 138 +++++++++--------- test/e2e/framework/test/fixtures/package.json | 2 +- .../test/sqlite/fixtures/package.json | 2 +- test/integration/package.json | 2 +- ...ete-statements-migration.mongo.e2e.test.ts | 2 +- .../enum-value-statements.mongo.e2e.test.ts | 6 +- .../keep-documents-advice.mongo.e2e.test.ts | 2 +- ...rename-delete-statements.mongo.e2e.test.ts | 2 +- .../stored-name-chains-and-merges.e2e.test.ts | 7 +- ...-name-chains-and-merges.sqlite.e2e.test.ts | 7 +- .../stored-name-db-update.e2e.test.ts | 4 +- .../stored-name-db-update.sqlite.e2e.test.ts | 4 +- .../cli-journeys/table-map-change.e2e.test.ts | 4 +- .../table-map-change.sqlite.e2e.test.ts | 8 +- .../value-object-backfill.mongo.e2e.test.ts | 9 +- .../value-object-statements.e2e.test.ts | 2 +- .../value-object-statements.mongo.e2e.test.ts | 5 +- ...value-object-statements.sqlite.e2e.test.ts | 2 +- .../variant-storage-moves.e2e.test.ts | 14 +- .../variant-storage-moves.sqlite.e2e.test.ts | 14 +- .../cli/cli-e2e-test-app/package.json | 2 +- .../cli/cli-integration-test-app/package.json | 2 +- .../cli-engine-0-10-1/app/instructions.md | 39 ----- .../extension/instructions.md | 39 ----- .../cli-engine-0-10-2/app/instructions.md | 36 +++++ .../extension/instructions.md | 36 +++++ 56 files changed, 246 insertions(+), 289 deletions(-) delete mode 100644 upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md delete mode 100644 upgrade-instructions/pending/cli-engine-0-10-1/extension/instructions.md create mode 100644 upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md create mode 100644 upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md diff --git a/apps/lsp-playground/package.json b/apps/lsp-playground/package.json index 0a03ed71dd24..cd7944a4bc89 100644 --- a/apps/lsp-playground/package.json +++ b/apps/lsp-playground/package.json @@ -35,7 +35,7 @@ "ws": "^8.21.2" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/apps/telemetry-backend/package.json b/apps/telemetry-backend/package.json index a84ac4d5cb7a..7917d54d54be 100644 --- a/apps/telemetry-backend/package.json +++ b/apps/telemetry-backend/package.json @@ -27,7 +27,7 @@ "evlog": "^2.24.0" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/compute-sdk": "^0.43.0", "@prisma/management-api-sdk": "^1.76.0", "@repo/prisma-bin": "workspace:8.0.0-rc.24", diff --git a/examples/bundle-size/package.json b/examples/bundle-size/package.json index 2dda6abef39e..72153c088b9b 100644 --- a/examples/bundle-size/package.json +++ b/examples/bundle-size/package.json @@ -28,7 +28,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/dev": "catalog:", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", diff --git a/examples/mongo-blog-leaderboard/package.json b/examples/mongo-blog-leaderboard/package.json index 6f178495271f..c59f88353f1c 100644 --- a/examples/mongo-blog-leaderboard/package.json +++ b/examples/mongo-blog-leaderboard/package.json @@ -19,7 +19,7 @@ "mongodb": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/mongo-demo/package.json b/examples/mongo-demo/package.json index db3634656a4b..9ec025dc893c 100644 --- a/examples/mongo-demo/package.json +++ b/examples/mongo-demo/package.json @@ -24,7 +24,7 @@ "react-dom": "^19.3.1" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/multi-extension-monorepo/package.json b/examples/multi-extension-monorepo/package.json index 9c2bea17ff92..ca860cd909a6 100644 --- a/examples/multi-extension-monorepo/package.json +++ b/examples/multi-extension-monorepo/package.json @@ -18,7 +18,7 @@ "@prisma/orm-postgres": "workspace:8.0.0-rc.24" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/paradedb-demo/package.json b/examples/paradedb-demo/package.json index c5eaf442f0a4..898adf86de85 100644 --- a/examples/paradedb-demo/package.json +++ b/examples/paradedb-demo/package.json @@ -25,7 +25,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/prisma-8-cloudflare-worker/package.json b/examples/prisma-8-cloudflare-worker/package.json index 9ef1ec6b5c42..7b755dd6a87b 100644 --- a/examples/prisma-8-cloudflare-worker/package.json +++ b/examples/prisma-8-cloudflare-worker/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@cloudflare/vitest-pool-workers": "0.20.3", "@cloudflare/workers-types": "5.20260804.1", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo-mariadb/package.json b/examples/prisma-8-demo-mariadb/package.json index 946d9af30729..bbcaaf3f2a70 100644 --- a/examples/prisma-8-demo-mariadb/package.json +++ b/examples/prisma-8-demo-mariadb/package.json @@ -20,7 +20,7 @@ "@prisma/orm-mariadb": "workspace:8.0.0-rc.24" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo-mysql/package.json b/examples/prisma-8-demo-mysql/package.json index d14006ca5c82..04ba5fb1122d 100644 --- a/examples/prisma-8-demo-mysql/package.json +++ b/examples/prisma-8-demo-mysql/package.json @@ -20,7 +20,7 @@ "@prisma/orm-mysql": "workspace:8.0.0-rc.24" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo-sqlite/package.json b/examples/prisma-8-demo-sqlite/package.json index 7ee0850ddbd5..67896ec06d86 100644 --- a/examples/prisma-8-demo-sqlite/package.json +++ b/examples/prisma-8-demo-sqlite/package.json @@ -21,7 +21,7 @@ "dotenv": "^17.4.2" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@types/node": "catalog:", diff --git a/examples/prisma-8-demo/package.json b/examples/prisma-8-demo/package.json index 1c2c7c2bd050..934b13a8c5fd 100644 --- a/examples/prisma-8-demo/package.json +++ b/examples/prisma-8-demo/package.json @@ -32,7 +32,7 @@ "react-dom": "^19.3.1" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/dev": "catalog:", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", diff --git a/examples/prisma-8-postgis-demo/package.json b/examples/prisma-8-postgis-demo/package.json index fb7afbe69a33..9af72464465a 100644 --- a/examples/prisma-8-postgis-demo/package.json +++ b/examples/prisma-8-postgis-demo/package.json @@ -33,7 +33,7 @@ "react-leaflet": "^5.0.0" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/prisma7-adoption/package.json b/examples/prisma7-adoption/package.json index 926466b22254..12b4d704ae7e 100644 --- a/examples/prisma7-adoption/package.json +++ b/examples/prisma7-adoption/package.json @@ -29,7 +29,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/dev": "catalog:", "@prisma/prisma7": "7.10.0", "@repo/test-utils": "workspace:8.0.0-rc.24", diff --git a/examples/react-router-demo/package.json b/examples/react-router-demo/package.json index b242ea3928ff..9abbfe685068 100644 --- a/examples/react-router-demo/package.json +++ b/examples/react-router-demo/package.json @@ -30,7 +30,7 @@ "react-router": "^8.3.1" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/dev": "catalog:", "@react-router/dev": "^8.3.1", "@repo/prisma-bin": "workspace:8.0.0-rc.24", diff --git a/examples/retail-store/package.json b/examples/retail-store/package.json index ab91e13b0983..90dd6be9b3c6 100644 --- a/examples/retail-store/package.json +++ b/examples/retail-store/package.json @@ -39,7 +39,7 @@ "tailwindcss": "^4.3.5" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/examples/supabase/package.json b/examples/supabase/package.json index b9067bfc92de..f976fdac977f 100644 --- a/examples/supabase/package.json +++ b/examples/supabase/package.json @@ -18,7 +18,7 @@ "pg": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/prisma-bin": "workspace:8.0.0-rc.24", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", diff --git a/packages/1-framework/3-tooling/cli/package.json b/packages/1-framework/3-tooling/cli/package.json index 2efd679cd347..7d6f9243a532 100644 --- a/packages/1-framework/3-tooling/cli/package.json +++ b/packages/1-framework/3-tooling/cli/package.json @@ -52,7 +52,7 @@ "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", "@internal/sql-operations": "workspace:8.0.0-rc.24", "@internal/sql-runtime": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", @@ -63,7 +63,7 @@ "vitest": "catalog:" }, "peerDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "typescript": ">=5.9" }, "peerDependenciesMeta": { diff --git a/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts b/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts index 4b9c3cacb074..b1f4442597f1 100644 --- a/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts +++ b/packages/1-framework/3-tooling/cli/src/orm/plan-question-prompt.ts @@ -134,7 +134,7 @@ function unansweredSubjects(error: CliStructuredError): ReadonlySet | un /** * The engine's refusal to answer, led by the ways to keep the data that the unanswered questions - * name: the next actions give them first, so they are not repeated in the summary or why. + * name: the next actions give them first, so they are not repeated in why. */ function ledByKeepDataWays(error: unknown, questions: readonly PlanQuestion[]): unknown { if (!isConsentRequired(error) || !CliStructuredError.is(error)) return error; @@ -147,11 +147,15 @@ function ledByKeepDataWays(error: unknown, questions: readonly PlanQuestion[]): ), ]; if (ways.length === 0) return error; - const withoutWays = (text: string) => - ways.reduce((rest, way) => rest.replaceAll(` ${way}`, '').replaceAll(`\n${way}`, ''), text); - return new CliStructuredError(error.code, withoutWays(error.message), { + return new CliStructuredError(error.code, error.message, { severity: error.severity, - ...ifDefined('why', error.why === undefined ? undefined : withoutWays(error.why)), + ...ifDefined( + 'why', + ways.reduce( + (why, way) => why?.replaceAll(` ${way}`, '').replaceAll(`\n${way}`, ''), + error.why, + ), + ), nextActions: [...ways.map(chooseAction), ...error.nextActions], diagnostics: error.diagnostics, ...ifDefined('where', error.where), diff --git a/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts b/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts index 2eec163309c3..7b33c1d0db91 100644 --- a/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts +++ b/packages/1-framework/3-tooling/cli/test/orm/plan-question-prompt.test.ts @@ -178,10 +178,13 @@ describe('a namespace answer typed at the prompt', () => { const prompt = { statements: vi.fn(async (questions: readonly { readonly subject: string }[]) => { asked.push(questions.map(({ subject }) => subject)); - throw Object.assign(new Error('3 choices are needed, and this run cannot ask you.'), { - code: 'CLI.CONSENT_REQUIRED', - unanswered: questions.map(({ subject }) => subject), - }); + throw Object.assign( + new Error('This command requires explicit consent, but it was not provided.'), + { + code: 'CLI.CONSENT_REQUIRED', + unanswered: questions.map(({ subject }) => subject), + }, + ); }), } as unknown as PromptSurface; @@ -380,13 +383,17 @@ describe('a refusal to answer a question that names ways to keep the data', () = }; const prompt = { statements: vi.fn(async () => { - throw new CliStructuredError('CLI.CONSENT_REQUIRED', kept.question, { - why: 'You have to choose what happens, and this run cannot ask you.', - nextActions: [ - { kind: 'user-choice', label: 'Run the command again with --delete Status.DONE' }, - ], - meta: { unanswered: [{ subject: 'Status.DONE', verbs: ['delete'] }] }, - }); + throw new CliStructuredError( + 'CLI.CONSENT_REQUIRED', + 'This command requires explicit consent, but it was not provided.', + { + why: kept.question, + nextActions: [ + { kind: 'user-choice', label: 'Run the command again with --delete Status.DONE' }, + ], + meta: { unanswered: [{ subject: 'Status.DONE', verbs: ['delete'] }] }, + }, + ); }), } as unknown as PromptSurface; const statements: StatementSurface = { @@ -396,8 +403,8 @@ describe('a refusal to answer a question that names ways to keep the data', () = await expect(promptPlanQuestions(prompt, statements)([kept])).rejects.toMatchObject({ code: 'CLI.CONSENT_REQUIRED', - message: 'Remove value "done" would lose enum value "Status.DONE".', - why: 'You have to choose what happens, and this run cannot ask you.', + message: 'This command requires explicit consent, but it was not provided.', + why: 'Remove value "done" would lose enum value "Status.DONE".', nextActions: [ { kind: 'user-choice', label: way }, { kind: 'user-choice', label: 'Run the command again with --delete Status.DONE' }, @@ -405,44 +412,6 @@ describe('a refusal to answer a question that names ways to keep the data', () = meta: { unanswered: [{ subject: 'Status.DONE', verbs: ['delete'] }] }, }); }); - - it('removes those ways from each question it lists when several are unanswered', async () => { - const way = 'To keep it, plan the change with `prisma migration plan`.'; - const keptQuestion = (value: string): PlanQuestion => ({ - ...question(`Status.${value}`), - question: `Remove value "${value}" would lose enum value "Status.${value}". ${way}`, - keepDataWays: [way], - }); - const done = keptQuestion('DONE'); - const open = keptQuestion('OPEN'); - const prompt = { - statements: vi.fn(async () => { - throw new CliStructuredError( - 'CLI.CONSENT_REQUIRED', - '2 choices are needed, and this run cannot ask you.', - { - why: `${done.question}\n${open.question}`, - meta: { - unanswered: [ - { subject: 'Status.DONE', verbs: ['delete'] }, - { subject: 'Status.OPEN', verbs: ['delete'] }, - ], - }, - }, - ); - }), - } as unknown as PromptSurface; - const statements: StatementSurface = { - take: vi.fn(() => []) as StatementSurface['take'], - values: () => [], - }; - - await expect(promptPlanQuestions(prompt, statements)([done, open])).rejects.toMatchObject({ - message: '2 choices are needed, and this run cannot ask you.', - why: 'Remove value "DONE" would lose enum value "Status.DONE".\nRemove value "OPEN" would lose enum value "Status.OPEN".', - nextActions: [{ kind: 'user-choice', label: way }], - }); - }); }); describe('a --delete for a subject answered without asking', () => { diff --git a/packages/1-framework/3-tooling/config-loader/package.json b/packages/1-framework/3-tooling/config-loader/package.json index f3a09de612e3..68d20dd05448 100644 --- a/packages/1-framework/3-tooling/config-loader/package.json +++ b/packages/1-framework/3-tooling/config-loader/package.json @@ -26,7 +26,7 @@ "tinyglobby": "catalog:" }, "devDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", @@ -36,7 +36,7 @@ "vitest": "catalog:" }, "peerDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "typescript": ">=5.9" }, "peerDependenciesMeta": { diff --git a/packages/3-extensions/citext/package.json b/packages/3-extensions/citext/package.json index 731faad87a26..91093a4add57 100644 --- a/packages/3-extensions/citext/package.json +++ b/packages/3-extensions/citext/package.json @@ -32,7 +32,7 @@ "@internal/postgres": "workspace:8.0.0-rc.24", "@internal/postgres-codec-testkit": "workspace:8.0.0-rc.24", "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/paradedb/package.json b/packages/3-extensions/paradedb/package.json index 6ccb3f55676f..0635ba116ef0 100644 --- a/packages/3-extensions/paradedb/package.json +++ b/packages/3-extensions/paradedb/package.json @@ -34,7 +34,7 @@ "@internal/operations": "workspace:8.0.0-rc.24", "@internal/sql-contract-psl": "workspace:8.0.0-rc.24", "@internal/target-postgres": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/pgvector/package.json b/packages/3-extensions/pgvector/package.json index 01fff6cd3c60..902b17d74115 100644 --- a/packages/3-extensions/pgvector/package.json +++ b/packages/3-extensions/pgvector/package.json @@ -39,7 +39,7 @@ "@internal/postgres": "workspace:8.0.0-rc.24", "@internal/postgres-codec-testkit": "workspace:8.0.0-rc.24", "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/postgis/package.json b/packages/3-extensions/postgis/package.json index 2822fc17e50a..6cd777170fae 100644 --- a/packages/3-extensions/postgis/package.json +++ b/packages/3-extensions/postgis/package.json @@ -37,7 +37,7 @@ "@internal/operations": "workspace:8.0.0-rc.24", "@internal/postgres": "workspace:8.0.0-rc.24", "@internal/sql-contract-ts": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-extensions/supabase/package.json b/packages/3-extensions/supabase/package.json index d7c6b33a454b..1efe9d553807 100644 --- a/packages/3-extensions/supabase/package.json +++ b/packages/3-extensions/supabase/package.json @@ -47,7 +47,7 @@ "@internal/operations": "workspace:8.0.0-rc.24", "@internal/psl-printer": "workspace:8.0.0-rc.24", "@internal/sql-contract-psl": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-targets/mysql/1-mysql/9-facade/package.json b/packages/3-targets/mysql/1-mysql/9-facade/package.json index 14590bc9cadf..3b4e8dffbdf9 100644 --- a/packages/3-targets/mysql/1-mysql/9-facade/package.json +++ b/packages/3-targets/mysql/1-mysql/9-facade/package.json @@ -45,7 +45,7 @@ "@internal/migration-tools": "workspace:8.0.0-rc.24", "@internal/psl-parser": "workspace:8.0.0-rc.24", "@internal/sql-schema-ir": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-targets/mysql/2-mariadb/9-facade/package.json b/packages/3-targets/mysql/2-mariadb/9-facade/package.json index c5e86c3ad3cc..d18b121f6519 100644 --- a/packages/3-targets/mysql/2-mariadb/9-facade/package.json +++ b/packages/3-targets/mysql/2-mariadb/9-facade/package.json @@ -42,7 +42,7 @@ "@internal/framework-components": "workspace:8.0.0-rc.24", "@internal/migration-tools": "workspace:8.0.0-rc.24", "@internal/sql-schema-ir": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/packages/3-targets/mysql/3-live-tests/package.json b/packages/3-targets/mysql/3-live-tests/package.json index 444acb7fe661..047a9388d148 100644 --- a/packages/3-targets/mysql/3-live-tests/package.json +++ b/packages/3-targets/mysql/3-live-tests/package.json @@ -30,7 +30,7 @@ "@internal/sql-runtime": "workspace:8.0.0-rc.24", "@internal/target-mariadb": "workspace:8.0.0-rc.24", "@internal/target-mysql": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "temporal-polyfill": "^1.0.8", diff --git a/packages/9-public/@prisma/orm-toolchain/package.json b/packages/9-public/@prisma/orm-toolchain/package.json index e8cfb897b9a8..7c751a49340f 100644 --- a/packages/9-public/@prisma/orm-toolchain/package.json +++ b/packages/9-public/@prisma/orm-toolchain/package.json @@ -49,7 +49,7 @@ "typescript": "catalog:" }, "peerDependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "typescript": ">=5.9", "vite": "^7.0.0 || ^8.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 993724603cce..9bad002ab305 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -198,8 +198,8 @@ importers: version: 8.21.3 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -238,8 +238,8 @@ importers: version: 2.24.0(express@5.2.1)(hono@4.11.4)(next@16.4.6(@types/node@26.1.2)(react-dom@19.3.1(react@19.3.1))(react@19.3.1))(react-router@8.5.2(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1))(react@19.3.1)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/compute-sdk': specifier: ^0.43.0 version: 0.43.0(@prisma/management-api-sdk@1.76.0)(encoding@0.1.13)(rollup@4.59.0) @@ -296,8 +296,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -351,8 +351,8 @@ importers: version: 7.5.0(socks@2.8.9) devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -397,8 +397,8 @@ importers: version: 19.3.1(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -446,8 +446,8 @@ importers: version: link:../../packages/9-public/@prisma/orm-postgres devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -486,8 +486,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -535,8 +535,8 @@ importers: specifier: 5.20260804.1 version: 5.20260804.1 '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -590,8 +590,8 @@ importers: version: 19.3.1(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -654,8 +654,8 @@ importers: version: link:../../packages/9-public/@prisma/orm-mariadb devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -679,8 +679,8 @@ importers: version: link:../../packages/9-public/@prisma/orm-mysql devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -710,8 +710,8 @@ importers: version: 17.4.2 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -765,8 +765,8 @@ importers: version: 5.0.0(leaflet@1.9.4)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -823,8 +823,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -887,8 +887,8 @@ importers: version: 8.5.2(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/dev': specifier: 'catalog:' version: 0.25.2(typescript@5.9.3)(vite@8.1.4(@types/node@26.1.2)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.15)(yaml@2.9.1)) @@ -996,8 +996,8 @@ importers: version: 4.3.5 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -1048,8 +1048,8 @@ importers: version: 8.22.0 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/prisma-bin': specifier: workspace:8.0.0-rc.24 version: link:../../test/prisma-bin @@ -1529,8 +1529,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../2-sql-family/5-runtime '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../test/utils @@ -1669,8 +1669,8 @@ importers: version: 0.2.17 devDependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../test/utils @@ -3267,8 +3267,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-ts '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3368,8 +3368,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../3-targets/postgres/1-target '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3456,8 +3456,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-ts '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3538,8 +3538,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-ts '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -3723,8 +3723,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../2-sql-family/2-authoring/contract-psl '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../test/utils @@ -4408,8 +4408,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../2-sql-family/1-core/schema-ir '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../../test/utils @@ -4631,8 +4631,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../2-sql-family/1-core/schema-ir '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../../test/utils @@ -4703,8 +4703,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../1-mysql/1-target '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../../../../test/utils @@ -6524,8 +6524,8 @@ importers: packages/9-public/@prisma/orm-toolchain: dependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-framework': specifier: workspace:8.0.0-rc.24 version: link:../orm-framework @@ -6685,8 +6685,8 @@ importers: test/e2e/framework/test/fixtures: dependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-extension-arktype-json': specifier: workspace:8.0.0-rc.24 version: link:../../../../../packages/9-public/@prisma/orm-extension-arktype-json @@ -6703,8 +6703,8 @@ importers: test/e2e/framework/test/sqlite/fixtures: dependencies: '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-sqlite': specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/9-public/@prisma/orm-sqlite @@ -6902,8 +6902,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../packages/0-shared/publish-surface '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@repo/test-utils': specifier: workspace:8.0.0-rc.24 version: link:../utils @@ -7034,8 +7034,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/1-framework/0-foundation/utils '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-extension-pgvector': specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/9-public/@prisma/orm-extension-pgvector @@ -7109,8 +7109,8 @@ importers: specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/1-framework/0-foundation/utils '@prisma/cli-engine': - specifier: 0.10.1 - version: 0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) + specifier: 0.10.2 + version: 0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4) '@prisma/orm-extension-pgvector': specifier: workspace:8.0.0-rc.24 version: link:../../../../../../packages/9-public/@prisma/orm-extension-pgvector @@ -8834,8 +8834,8 @@ packages: '@prisma/adapter-pg@7.10.1': resolution: {integrity: sha512-EP9ruPYHjKP80WZlb5qVaEXKgZjJieBFjAxcBtQnDAHD6+16UN4keVmBh6L/RUpuDQT2FQRbvKNgq5d4Ix+IkQ==} - '@prisma/cli-engine@0.10.1': - resolution: {integrity: sha512-PeowmWlUzgfm1R2wIzkqjG+1E/0vEyEMuqZBDObnfsrtJ0JBiYXROM3MXhFBF1QNTr9zWjxCYlljiMBjtyk1dA==} + '@prisma/cli-engine@0.10.2': + resolution: {integrity: sha512-P1y+9/nCiOUuCOfs2woMHWgXRqnETFjDQEjgawZvU9W/0kVmIO3E/rKNVMCXwDU+SJYx4m0H+o32qTmRN8blCw==} engines: {node: '>=22.12.0'} peerDependencies: '@prisma/management-api-sdk': ^1.55.0 @@ -14681,7 +14681,7 @@ snapshots: transitivePeerDependencies: - pg-native - '@prisma/cli-engine@0.10.1(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4)': + '@prisma/cli-engine@0.10.2(@prisma/management-api-sdk@1.76.0)(magicast@0.5.4)': dependencies: '@clack/prompts': 1.5.0 '@prisma/management-api-sdk': 1.76.0 diff --git a/test/e2e/framework/test/fixtures/package.json b/test/e2e/framework/test/fixtures/package.json index 2638965eb9c4..5dcee78a54ef 100644 --- a/test/e2e/framework/test/fixtures/package.json +++ b/test/e2e/framework/test/fixtures/package.json @@ -5,7 +5,7 @@ "version": "8.0.0-rc.24", "description": "The Postgres fixture of the e2e suite. Its own manifest because emission reads the nearest one to decide which package names generated files import, and this suite exercises two databases whose halves must not name each other's facade.", "dependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/orm-extension-arktype-json": "workspace:8.0.0-rc.24", "@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.24", "@prisma/orm-postgres": "workspace:8.0.0-rc.24", diff --git a/test/e2e/framework/test/sqlite/fixtures/package.json b/test/e2e/framework/test/sqlite/fixtures/package.json index 5d5a3277c264..c5d6baf45993 100644 --- a/test/e2e/framework/test/sqlite/fixtures/package.json +++ b/test/e2e/framework/test/sqlite/fixtures/package.json @@ -5,7 +5,7 @@ "version": "8.0.0-rc.24", "description": "The SQLite fixture of the e2e suite. Its own manifest because emission reads the nearest one to decide which package names generated files import, and this suite exercises two databases whose halves must not name each other's facade.", "dependencies": { - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/orm-sqlite": "workspace:8.0.0-rc.24" } } diff --git a/test/integration/package.json b/test/integration/package.json index 3918ef788da5..55fa38a26a8a 100644 --- a/test/integration/package.json +++ b/test/integration/package.json @@ -89,7 +89,7 @@ "@internal/middleware-cache": "workspace:8.0.0-rc.24", "@internal/mongo-lowering": "workspace:8.0.0-rc.24", "@internal/publish-surface": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@repo/test-utils": "workspace:8.0.0-rc.24", "@repo/tsconfig": "workspace:8.0.0-rc.24", "@repo/tsdown": "workspace:8.0.0-rc.24", diff --git a/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts b/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts index 14e923dac6b3..4b420605ccb1 100644 --- a/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/delete-statements-migration.mongo.e2e.test.ts @@ -339,7 +339,7 @@ describe('Journeys (MongoDB): statements that consent to data loss', { /dropCollection\(['"]events|createCollection\(['"]occasions/, ); writeFileSync(migrationTs, edited, 'utf-8'); - const emitted = runPrintedSelfEmit(String(engineError(asked)?.summary), dirname(migrationTs)); + const emitted = runPrintedSelfEmit(String(engineError(asked)?.why), dirname(migrationTs)); expect(emitted.exitCode, `S5.09: node on migration.ts, as printed: ${emitted.stderr}`).toBe(0); const applyRemap = await runMigrate(ctx); expect(applyRemap.exitCode, `S5.10: migrate: ${applyRemap.stderr}`).toBe(0); diff --git a/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts b/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts index 56796acb3982..082413933b0c 100644 --- a/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/enum-value-statements.mongo.e2e.test.ts @@ -548,7 +548,7 @@ describe('Journeys (MongoDB): enum value statements', { await emit(ctx, chained, 'E7.03'); const asked = await runDbUpdate(ctx, ['--no-interactive', '--json']); - expect(engineError(asked)?.summary).toContain( + expect(engineError(asked)?.why).toContain( 'If "Status.ARCHIVED" is now "Status.RETIRED", add --rename Status.ARCHIVED:Status.RETIRED, and the next question says how to keep the data of both.', ); const renamed = await runDbUpdate(ctx, [ @@ -558,12 +558,12 @@ describe('Journeys (MongoDB): enum value statements', { '--json', ]); expect({ - summary: engineError(renamed)?.summary, + why: engineError(renamed)?.why, twoRuns: (engineError(renamed)?.nextActions ?? []) .map(({ label }) => label) .filter((label) => label.startsWith('To keep it with db update')), }).toEqual({ - summary: [ + why: [ 'These operations would lose enum value "Status.ACTIVE" from the data that holds it:', '- Remove value "active" from field status of collection users', '- Remove value "active" from field tags of collection users', diff --git a/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts b/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts index 20e7e8111e83..1cade1e8c2aa 100644 --- a/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/keep-documents-advice.mongo.e2e.test.ts @@ -92,7 +92,7 @@ describe('Journey (MongoDB): keeping the documents of a collection created only await emitFixture(project, 'contract-indexed-events-remapped.ts', 'K.04'); const asked = await runMigrationPlan(project, ['--from', origin, '--json']); expect(asked.exitCode, 'K.05: the drop of events needs a statement').toBe(2); - const question = String(engineError(asked)?.summary); + const question = String(engineError(asked)?.why); expect(question, 'K.05: the question says where the rename goes').toContain( 'make renameCollection("events", "occasions") the first operation, imported with the other operations, delete the drop of "events", and delete the create of "occasions" if there is one', ); diff --git a/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts b/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts index 5e61a97a5d04..f4e61592c5ac 100644 --- a/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/rename-delete-statements.mongo.e2e.test.ts @@ -321,7 +321,7 @@ describe('Journeys (MongoDB): --rename and --delete', { const printed = printedFlags(refused, 'delete'); expect(printed, 'R3.04: named by its collection').toEqual(['--delete', 'profiles.nickname']); expect( - String(engineError(refused)?.summary) + String(engineError(refused)?.why) .split('\n') .map((line) => line.slice(0, 3)), 'R3.04: the question, then each way to keep the data on a line of its own', diff --git a/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts index 6e3ba23dd857..efcb3876b43f 100644 --- a/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-chains-and-merges.e2e.test.ts @@ -221,9 +221,8 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', nextActions: [ { kind: 'user-choice', label: 'Run the command again with --rename Bug:Defect' }, { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, @@ -272,7 +271,7 @@ withTempDir(({ createTempDir }) => { expect(await refusal(journey, [], 'G2.03'), 'G2.03: the questions').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '2 choices are needed, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', why: `Drop table "bug" would lose the data of model "Bug". ${MERGE_ADVICE}\nDrop table "task" would lose the data of model "Task". ${MERGE_ADVICE}`, nextActions: [ { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, diff --git a/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts index 57d01c3a78e6..ef8b49f2fa4c 100644 --- a/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-chains-and-merges.sqlite.e2e.test.ts @@ -195,9 +195,8 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'These operations would lose the data of model "Bug":\n- Drop table "bug"\n- Delete the rows of "task" that hold value "bug" in column "type"', nextActions: [ { kind: 'user-choice', label: 'Run the command again with --rename Bug:Defect' }, { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, @@ -244,7 +243,7 @@ withTempDir(({ createTempDir }) => { expect(await refusal(journey, [], 'G2.03'), 'G2.03: the questions').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: '2 choices are needed, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', why: `Drop table "bug" would lose the data of model "Bug". ${MERGE_ADVICE}\nDrop table "task" would lose the data of model "Task". ${MERGE_ADVICE}`, nextActions: [ { kind: 'user-choice', label: 'Run the command again with --delete Bug' }, diff --git a/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts index c157a131148a..b644592b758c 100644 --- a/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-db-update.e2e.test.ts @@ -77,8 +77,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'D1.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts index 99d62198b967..6f64026f506f 100644 --- a/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/stored-name-db-update.sqlite.e2e.test.ts @@ -75,8 +75,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'D1.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/table-map-change.e2e.test.ts b/test/integration/test/cli-journeys/table-map-change.e2e.test.ts index 592d54a566c3..ca9bd0b35938 100644 --- a/test/integration/test/cli-journeys/table-map-change.e2e.test.ts +++ b/test/integration/test/cli-journeys/table-map-change.e2e.test.ts @@ -165,8 +165,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'M4.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts index 062741b9ad91..b2c248d35b69 100644 --- a/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/table-map-change.sqlite.e2e.test.ts @@ -96,8 +96,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'M2.03: the question names User.score').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: `Recreate table people would change the type of field "User.score" and can change or lose its values.${convert} --delete keeps the field and lets the database cast its values, which can change or lose some.`, - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: `Recreate table people would change the type of field "User.score" and can change or lose its values.${convert} --delete keeps the field and lets the database cast its values, which can change or lose some.`, nextActions: verbs.map((verb) => ({ kind: 'user-choice', label: `Run the command again with --${verb} User.score`, @@ -167,8 +167,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'M4.03: the question names User.nick').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: 'Drop column "nick" from "people" would lose the values of field "User.nick".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop column "nick" from "people" would lose the values of field "User.nick".', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts b/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts index bb1e815e54f9..55c0dfca98eb 100644 --- a/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-backfill.mongo.e2e.test.ts @@ -371,11 +371,11 @@ describe('Journeys (MongoDB): required fields new inside value objects and embed const asked = engineError(await runMigrationPlan(ctx, [...from, '--json'])); expect({ code: asked?.code, - summary: asked?.summary, + why: asked?.why, answers: asked?.nextActions?.map(({ label }) => label), }).toEqual({ code: 'CLI.CONSENT_REQUIRED', - summary: [ + why: [ 'These operations would lose the values of value object field "Address.zip":', '- Remove key "zip" at path "$" in field home of collection users', '- Remove key "zip" at path "$[*]" in field addresses of collection users', @@ -428,10 +428,7 @@ describe('Journeys (MongoDB): required fields new inside value objects and embed '--json', ]), ); - expect( - seen?.summary, - 'B3.11: a field with no temporary value still needs --backfill', - ).toContain( + expect(seen?.why, 'B3.11: a field with no temporary value still needs --backfill').toContain( 'If you answer delete, the new required field "Address.seen" still needs a value: add --backfill Address.seen to write it in migration.ts.', ); }); diff --git a/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts index 3a4d5523571f..29547fa5772d 100644 --- a/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts @@ -216,7 +216,7 @@ withTempDir(({ createTempDir }) => { const asked = await refusal(ctx, via, 'O1.04'); if (via === 'db update') { expect(asked, 'O1.04: one question, the rename offered').toContain( - '"summary":"These operations would lose the values of value object field \\"GeoPoint.lat\\":', + '"summary":"This command requires explicit consent, but it was not provided."', ); expect(asked, 'O1.04: what --delete leaves in the new field').toContain( 'the existing objects get a temporary value in the new required field \\"GeoPoint.latitude\\"', diff --git a/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts index 7af7dce3bcdb..bb0a5ebf1943 100644 --- a/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts @@ -354,9 +354,8 @@ describe('Journeys (MongoDB): renames and removals inside value objects and embe }).toEqual({ exitCode: 'failed', code: 'CLI.CONSENT_REQUIRED', - summary: - 'Remove key "zip" at path "$" in field home of collection users would lose the values of value object field "Address.zip".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Remove key "zip" at path "$" in field home of collection users would lose the values of value object field "Address.zip".', answers: [ "Run the command again with --rename 'Address.zip:Address.'", 'Run the command again with --delete Address.zip', diff --git a/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts index f73dc1a7465d..680feac1a830 100644 --- a/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts @@ -204,7 +204,7 @@ withTempDir(({ createTempDir }) => { const asked = await refusal(ctx, via, 'O1.04'); if (via === 'db update') { expect(asked, 'O1.04: one question, the rename offered').toContain( - '"summary":"These operations would lose the values of value object field \\"GeoPoint.lat\\":', + '"summary":"This command requires explicit consent, but it was not provided."', ); expect(asked, 'O1.04: what --delete leaves in the new field').toContain( 'the existing objects get a temporary value in the new required field \\"GeoPoint.latitude\\"', diff --git a/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts b/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts index 25bf5a756051..7d5cf11f0abf 100644 --- a/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts +++ b/test/integration/test/cli-journeys/variant-storage-moves.e2e.test.ts @@ -117,9 +117,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'J1.03: the question names Bug.severity').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', nextActions: [ { kind: 'user-choice', @@ -169,8 +168,8 @@ withTempDir(({ createTempDir }) => { expect(askedBack, 'J1.07: the question names Bug').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: 'Drop table "bug" would lose the data of model "Bug".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop table "bug" would lose the data of model "Bug".', nextActions: [ { kind: 'user-choice', @@ -236,9 +235,8 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts index cce78b526fe6..9b02e82cb8cb 100644 --- a/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/variant-storage-moves.sqlite.e2e.test.ts @@ -112,9 +112,8 @@ withTempDir(({ createTempDir }) => { expect(asked, 'J1.03: the question names Bug.severity').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop column "severity" from "task" would lose the values of field "Bug.severity".', nextActions: [ { kind: 'user-choice', @@ -160,8 +159,8 @@ withTempDir(({ createTempDir }) => { expect(askedBack, 'J1.07: the question names Bug').toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: 'Drop table "bug" would lose the data of model "Bug".', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'Drop table "bug" would lose the data of model "Bug".', nextActions: [ { kind: 'user-choice', @@ -225,9 +224,8 @@ withTempDir(({ createTempDir }) => { ).toEqual({ code: 'CLI.CONSENT_REQUIRED', severity: 'error', - summary: - 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"\nSQLite migrations run with foreign keys off, so deleting these rows does not delete the rows of "defect" that reference them: the apply then fails at PRAGMA foreign_key_check. Delete or change those rows first.', - why: 'You have to choose what happens, and this run cannot ask you.', + summary: 'This command requires explicit consent, but it was not provided.', + why: 'These operations would lose the data of model "Bug":\n- Drop column "severity" from "task"\n- Delete the rows of "task" that hold value "bug" in column "type"\nSQLite migrations run with foreign keys off, so deleting these rows does not delete the rows of "defect" that reference them: the apply then fails at PRAGMA foreign_key_check. Delete or change those rows first.', nextActions: [ { kind: 'user-choice', diff --git a/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json b/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json index f42c46b1ce62..5595a11e9e7f 100644 --- a/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json +++ b/test/integration/test/fixtures/cli/cli-e2e-test-app/package.json @@ -19,7 +19,7 @@ "@internal/target-mongo": "workspace:8.0.0-rc.24", "@internal/target-postgres": "workspace:8.0.0-rc.24", "@internal/utils": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.24", "@prisma/orm-mongo": "workspace:8.0.0-rc.24", "@prisma/orm-postgres": "workspace:8.0.0-rc.24", diff --git a/test/integration/test/fixtures/cli/cli-integration-test-app/package.json b/test/integration/test/fixtures/cli/cli-integration-test-app/package.json index ef3a488b5496..8d1399312b0a 100644 --- a/test/integration/test/fixtures/cli/cli-integration-test-app/package.json +++ b/test/integration/test/fixtures/cli/cli-integration-test-app/package.json @@ -20,7 +20,7 @@ "@internal/target-mongo": "workspace:8.0.0-rc.24", "@internal/target-postgres": "workspace:8.0.0-rc.24", "@internal/utils": "workspace:8.0.0-rc.24", - "@prisma/cli-engine": "0.10.1", + "@prisma/cli-engine": "0.10.2", "@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.24", "@prisma/orm-mongo": "workspace:8.0.0-rc.24", "@prisma/orm-postgres": "workspace:8.0.0-rc.24", diff --git a/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md deleted file mode 100644 index fcc94f19479a..000000000000 --- a/upgrade-instructions/pending/cli-engine-0-10-1/app/instructions.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -changes: - - id: engine-pin-moves-to-0-10-1 - summary: | - The toolchain now requires `@prisma/cli-engine@0.10.1` (up from 0.10.0). A project that depends on `@prisma/cli-engine` itself must move to `0.10.1`. - detection: - glob: "**/{package.json,pnpm-workspace.yaml}" - matches: - - '"@prisma/cli-engine":\s*"[^"]*(? Date: Mon, 23 Nov 2026 12:34:47 +1100 Subject: [PATCH 05/13] The deferred list no longer describes the refusal layout of engine 0.10.1 Drops the entry about a several-line first line, keeps the manual QA problems that still hold with engine 0.10.2, and quotes their 0.10.2 text. Signed-off-by: willbot Signed-off-by: Will Madden --- projects/migration-statements/deferred.md | 47 +++++++---------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/projects/migration-statements/deferred.md b/projects/migration-statements/deferred.md index e16c4eef1170..590fa782c2cb 100644 --- a/projects/migration-statements/deferred.md +++ b/projects/migration-statements/deferred.md @@ -62,25 +62,6 @@ Adding a required field to a populated collection, or making an optional field r `CLI.CONSENT_REQUIRED` lists one `user-choice` next action per flag form ("Run the command again with --delete Legacy", another for the rename form), not grouped by subject and not a complete runnable command. Grouping the forms per subject and printing a full command would need the engine to know the invocation; raise it on prisma/prisma-cli once the statement prompt has shipped. -## A question of several lines becomes a first line of several lines, with its list at the left edge - -**Found:** review and manual QA of the move to `@prisma/cli-engine` 0.10.1 (2026-11-23). Engine side. - -From engine 0.10.1, when one question is left unanswered, the refusal's summary is the question itself. A question about several operations is a heading and a list (`plan-questions.ts` writes it that way, because the list is what the terminal prompt shows), so the summary is several lines. The engine prints the later lines of the summary at the left edge, while it indents the later lines of `why`. Manual QA on SQLite, removing the value object field `GeoPoint.lng`: - -```text -$ prisma db update --no-interactive -✘ [CLI.CONSENT_REQUIRED] These operations would lose the values of value object field "GeoPoint.lng": -- Remove key "lng" at path "$" in column "location" of "site" -- Remove key "lng" at path "$[*]" in column "history" of "site" -- Remove key "lng" at path "$.point" in column "place" of "site" - why: You have to choose what happens, and this run cannot ask you. -→ Run the command again with --rename 'GeoPoint.lng:GeoPoint.' -→ Run the command again with --delete GeoPoint.lng -``` - -The list looks like separate output, and the question seems to end before `why:`. This breaks the rule in `docs/CLI Style Guide.md` that an error's first line is a concise summary. Every fact and flag is still there. The fix belongs in the engine, which chose to put the question in the summary and owns the layout. Either indent the later lines of the summary as it already indents those of `why`, or make the summary only the question's first line and put the rest at the start of `why`. Flattening the question in the ORM would spoil the terminal prompt, where the list is the point. - ## SQL variants stored in their own tables **Found:** slice 4a design (2026-10-09). Will: SQL will need to handle multi-table storage of variants in the future. @@ -177,7 +158,7 @@ Everything the prompt adapter (`packages/1-framework/3-tooling/cli/src/orm/plan- - The one-question-at-a-time mode (`askOneAtATime`), used when a question is about a removed namespace, so a typed `delete billing` answers the rest of the namespace and a typed `rename billing:finance` leaves them open for the next round. - `isConsentRequired`, which catches the engine's `CLI.CONSENT_REQUIRED` for one question and asks the engine again with every open question, so its refusal names them all. - The `undefined` answer that `AnswerPlanQuestions` may return beside a `rename` or `convert` answer, and the `InternalError` in `checkAnswers` that guards it. -- `ledByKeepDataWays`, which removes the ways to keep the data from the question text in the refusal's summary and `why`, because it gives them first in the next actions. It goes once the engine's question has its own field for ways to keep the data, which the engine shows in the prompt and turns into next actions when it refuses. +- `ledByKeepDataWays`, which removes the ways to keep the data from the question text in the refusal's `why`, because it gives them first in the next actions. It goes once the engine's question has its own field for ways to keep the data, which the engine shows in the prompt and turns into next actions when it refuses. ## `SchemaTables` is asked about namespace ids of the origin contract @@ -530,23 +511,21 @@ The origin stores `User` in `users` with primary key `users_pkey`; the destinati The constraint rename is a companion inside the `renameTable` call, and running `migration.ts` again rebuilds the companions inside `this.renameTable(...)`, so it cannot simply move later in the plan. Two fixes: run a drop of a table no rename touches before the renames, or write that companion as its own call after the drop. This is a second case of the limit recorded under "A SQLite column rename followed by a table rebuild builds the replacement index twice": operations carry no dependency information. Until then the user drops the stale table first. -## Problems found by manual QA on 2026-11-23 (engine 0.10.1) +## Problems found by manual QA on 2026-11-23 -**Found:** manual QA of the move to `@prisma/cli-engine` 0.10.1 on SQLite (2026-11-23), run as a user who knows their models and fields. None is fixed. Each line says whether another entry already covers it. +**Found:** manual QA on SQLite (2026-11-23), run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problems that existed only in that version's layout of the refusal are left out, and the rest hold with 0.10.2. None is fixed. Each line says whether another entry already covers it. 1. A value object field renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`: the first error says to add `--backfill GeoPoint.latitude`; the question that follows offers `--rename GeoPoint.lat:GeoPoint.latitude`; giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". That is false, since `latitude` is new; the real conflict is a rename and a backfill of the same field. New. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. 2. For that rename, `migration plan` first fails with "Migration planning failed" about the new required field, while `db update`, and `migration plan` on a model field, ask the question at once. The same change gives a different first error by command and by whether the field is in a model or a value object. Partly covered: "A value object field has no default, so `--backfill` has none to respect" explains why `migration plan` needs `--backfill`; the different first error is new. 3. With two models removed, the error prints four "Run the command again with …" lines as if any one were enough. The user needs one choice per model, and following one line refuses again for the other model. Covered by "The refusal's next actions are one line per flag, not grouped by subject". 4. A removed model or value object field with nothing to rename to is offered `--rename 'Comment:'` or `--rename 'GeoPoint.lng:GeoPoint.'`. The line cannot be run as printed, and run literally it fails with "has no field """. New. -5. A question about several operations prints its list at the left edge, under the error's first line and above the indented `why:`, so the list looks like separate output. Covered by "A question of several lines becomes a first line of several lines, with its list at the left edge". -6. When the run cannot ask, the question still says "If you answer delete, the existing objects get a temporary value …". There is nothing to answer; it should say "If you choose --delete GeoPoint.lat, …". The text comes from `plan-questions.ts`. New. -7. Value object locations are written as JSON paths and table names, such as `at path "$[*]" in column "history" of "site"`, where the user knows `Site.history`; "of "site"" does not even say it is a table. The planning failure lists the same places in a different order from the question. New. -8. A mistyped `--delete Nope.field` is reported only as "--delete Nope.field does not name User.name.". After the user adds the right flag and keeps the typo, a second error says "Remove the flag, or spell the subject the way the command names it." A mistyped `--rename` target, by contrast, is rejected at once with a clear reason. The typo should be reported in the first error. Partly covered: "Three texts the stored-name renames QA found outside its scope" covers the "spell the subject" wording; reporting the typo first is new. -9. On SQLite a removed field's question starts "Recreate table user would lose the values of field "User.name".". Recreating the table is how SQLite makes the change, not what the user did, and the table name is not quoted, while a dropped table is (`Drop table "comment"`). Partly covered: "SQLite operation labels do not quote names" covers the quoting; naming the user's change instead of SQLite's step is new. -10. One question puts the loss in the first line and "You have to choose what happens, and this run cannot ask you." under `why:`; several questions put "2 choices are needed, and this run cannot ask you." in the first line and the losses under `why:`. The same information sits under different labels. New, engine side. -11. Messages use project terms a user does not know: "origin contract", "destination contract", "destination value object", "statement" (as in `Cannot resolve statement "--rename …"`), "postchecks already held", "contract space(s)", "self-emit", "attest the package". A user thinks of the old schema, the new schema and the `--rename` flag. Partly covered: "Statement errors say "rows" on MongoDB" asks for one pass over the statement errors' wording, and "Three texts the stored-name renames QA found outside its scope" covers "the subject"; the rest is new. -12. After `--delete User.name` on SQLite, both commands say "Applied 1 of 2 operation(s) …; the other 1 had nothing to do, since their postchecks already held". "the other 1 … their" is ungrammatical, and the user is shown a `Drop column "name" from "user"` step that does nothing because the table recreate already removed the column. New. The text is in `applied-summary.ts`; "A SQLite column rename followed by a table rebuild builds the replacement index twice" is a similar extra step after a rebuild. -13. The DDL preview of that migration shows `CREATE TABLE "_prisma_new_user"`, `DROP TABLE "user"` and the rename, but not the `INSERT … SELECT` that copies the rows, so it reads as if every row is dropped. It then shows `DROP COLUMN "name"` on a table that no longer has that column. The data is in fact kept. Partly covered: "Three texts the stored-name renames QA found outside its scope" records that the DDL preview leaves out value rewrites; the missing row copy is the same fault, and the extra drop is problem 12. -14. After `db update --delete User.name`, the warning about the temporary value says "To choose the value, plan a migration with prisma migration plan --from 33a42cee… --backfill User.displayName instead.". The update has already run, so "instead" comes too late, and the user does not know or easily check a 64-character hash. The text is in `migration-blocks.ts`. New. -15. Under `--yes` the refusal says "You have to choose what happens, and --yes does not choose for you.", which is clear. A user may wonder whether to keep `--yes` when running the printed line again; keeping it works. New and minor. -16. In a terminal, `db update` prints each progress step twice, as a `▸` line and then a `✔` line, so four lines come before the error. `migration plan` prints none. New. +5. When the run cannot ask, the question still says "If you answer delete, the existing objects get a temporary value …". There is nothing to answer; it should say "If you choose --delete GeoPoint.lat, …". The text comes from `plan-questions.ts`. New. +6. Value object locations are written as JSON paths and table names, such as `at path "$[*]" in column "history" of "site"`, where the user knows `Site.history`; "of "site"" does not even say it is a table. The planning failure lists the same places in a different order from the question. New. +7. A mistyped `--delete Nope.field` is reported only as "--delete Nope.field answers no question; the questions are about User.name.". After the user adds the right flag and keeps the typo, a second error says "Remove the flag, or spell the subject the way the command names it." A mistyped `--rename` target, by contrast, is rejected at once with a clear reason. The typo should be reported in the first error. Partly covered: "Three texts the stored-name renames QA found outside its scope" covers the "spell the subject" wording; reporting the typo first is new. +8. On SQLite a removed field's question starts "Recreate table user would lose the values of field "User.name".". Recreating the table is how SQLite makes the change, not what the user did, and the table name is not quoted, while a dropped table is (`Drop table "comment"`). Partly covered: "SQLite operation labels do not quote names" covers the quoting; naming the user's change instead of SQLite's step is new. +9. Messages use project terms a user does not know: "origin contract", "destination contract", "destination value object", "statement" (as in `Cannot resolve statement "--rename …"`), "postchecks already held", "contract space(s)", "self-emit", "attest the package". A user thinks of the old schema, the new schema and the `--rename` flag. Partly covered: "Statement errors say "rows" on MongoDB" asks for one pass over the statement errors' wording, and "Three texts the stored-name renames QA found outside its scope" covers "the subject"; the rest is new. +10. After `--delete User.name` on SQLite, both commands say "Applied 1 of 2 operation(s) …; the other 1 had nothing to do, since their postchecks already held". "the other 1 … their" is ungrammatical, and the user is shown a `Drop column "name" from "user"` step that does nothing because the table recreate already removed the column. New. The text is in `applied-summary.ts`; "A SQLite column rename followed by a table rebuild builds the replacement index twice" is a similar extra step after a rebuild. +11. The DDL preview of that migration shows `CREATE TABLE "_prisma_new_user"`, `DROP TABLE "user"` and the rename, but not the `INSERT … SELECT` that copies the rows, so it reads as if every row is dropped. It then shows `DROP COLUMN "name"` on a table that no longer has that column. The data is in fact kept. Partly covered: "Three texts the stored-name renames QA found outside its scope" records that the DDL preview leaves out value rewrites; the missing row copy is the same fault, and the extra drop is problem 10. +12. After `db update --delete User.name`, the warning about the temporary value says "To choose the value, plan a migration with prisma migration plan --from 33a42cee… --backfill User.displayName instead.". The update has already run, so "instead" comes too late, and the user does not know or easily check a 64-character hash. The text is in `migration-blocks.ts`. New. +13. Under `--yes` the refusal says "This command requires explicit consent, and --yes does not give it.", which is clear. A user may wonder whether to keep `--yes` when running the printed line again; keeping it works. New and minor. +14. In a terminal, `db update` prints each progress step twice, as a `▸` line and then a `✔` line, so four lines come before the error. `migration plan` prints none. New. From dc6f3c8449c9c3c2497dd7f880b99640cece3b62 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:42:55 +1100 Subject: [PATCH 06/13] The value object journeys check again that the refusal asks one question about GeoPoint.lat or Address.zip, and the --yes refusal checks its first line The old first line named the subject, so it also proved there was one question. The fixed sentence of engine 0.10.2 proves neither, so the journeys now read meta.unanswered. The db update --yes step now asserts the --yes sentence, which no test checked. Signed-off-by: willbot Signed-off-by: Will Madden --- .../test/cli-journeys/db-update-workflows.e2e.test.ts | 1 + .../test/cli-journeys/value-object-statements.e2e.test.ts | 5 ++++- .../cli-journeys/value-object-statements.mongo.e2e.test.ts | 2 ++ .../cli-journeys/value-object-statements.sqlite.e2e.test.ts | 5 ++++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/integration/test/cli-journeys/db-update-workflows.e2e.test.ts b/test/integration/test/cli-journeys/db-update-workflows.e2e.test.ts index 677ec11c8a7a..c3808e19232f 100644 --- a/test/integration/test/cli-journeys/db-update-workflows.e2e.test.ts +++ b/test/integration/test/cli-journeys/db-update-workflows.e2e.test.ts @@ -119,6 +119,7 @@ withTempDir(({ createTempDir }) => { expect(yesAlone.exitCode, 'E.04: --yes does not grant consent').toBe(2); expect(parseJsonOutput(yesAlone), 'E.04: consent error').toMatchObject({ code: 'CLI.CONSENT_REQUIRED', + summary: 'This command requires explicit consent, and --yes does not give it.', }); // E.05: db update --confirm — answers no question diff --git a/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts index 29547fa5772d..a9bc0f9b1d8b 100644 --- a/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.e2e.test.ts @@ -215,9 +215,12 @@ withTempDir(({ createTempDir }) => { const asked = await refusal(ctx, via, 'O1.04'); if (via === 'db update') { - expect(asked, 'O1.04: one question, the rename offered').toContain( + expect(asked, 'O1.04: the consent error').toContain( '"summary":"This command requires explicit consent, but it was not provided."', ); + expect(asked, 'O1.04: one question, about GeoPoint.lat').toContain( + '"unanswered":[{"subject":"GeoPoint.lat","verbs":["rename","delete"]}]', + ); expect(asked, 'O1.04: what --delete leaves in the new field').toContain( 'the existing objects get a temporary value in the new required field \\"GeoPoint.latitude\\"', ); diff --git a/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts index bb0a5ebf1943..9059a2dffea9 100644 --- a/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.mongo.e2e.test.ts @@ -351,6 +351,7 @@ describe('Journeys (MongoDB): renames and removals inside value objects and embe summary: question?.summary, why: question?.why, answers: question?.nextActions?.map(({ label }) => label), + unanswered: question?.meta?.['unanswered'], }).toEqual({ exitCode: 'failed', code: 'CLI.CONSENT_REQUIRED', @@ -360,6 +361,7 @@ describe('Journeys (MongoDB): renames and removals inside value objects and embe "Run the command again with --rename 'Address.zip:Address.'", 'Run the command again with --delete Address.zip', ], + unanswered: [{ subject: 'Address.zip', verbs: ['rename', 'delete'] }], }); const answered = await runMigrationPlan(ctx, [ diff --git a/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts b/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts index 680feac1a830..30570eec5176 100644 --- a/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts +++ b/test/integration/test/cli-journeys/value-object-statements.sqlite.e2e.test.ts @@ -203,9 +203,12 @@ withTempDir(({ createTempDir }) => { const asked = await refusal(ctx, via, 'O1.04'); if (via === 'db update') { - expect(asked, 'O1.04: one question, the rename offered').toContain( + expect(asked, 'O1.04: the consent error').toContain( '"summary":"This command requires explicit consent, but it was not provided."', ); + expect(asked, 'O1.04: one question, about GeoPoint.lat').toContain( + '"unanswered":[{"subject":"GeoPoint.lat","verbs":["rename","delete"]}]', + ); expect(asked, 'O1.04: what --delete leaves in the new field').toContain( 'the existing objects get a temporary value in the new required field \\"GeoPoint.latitude\\"', ); From 350f0763cfe59741eaca5bd7d91dab6cf9482a63 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:43:06 +1100 Subject: [PATCH 07/13] The upgrade note for engine 0.10.2 now finds code that matches only part of the old first line, and looks in snapshot, TSX and JSX files too Signed-off-by: willbot Signed-off-by: Will Madden --- .../pending/cli-engine-0-10-2/app/instructions.md | 8 +++----- .../pending/cli-engine-0-10-2/extension/instructions.md | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md index 537fd0c9e0fc..3996067f21d8 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md @@ -12,12 +12,10 @@ changes: summary: | When `prisma migration plan` or `prisma db update` cannot ask a statement question, the first line of `CLI.CONSENT_REQUIRED` is now one fixed sentence that names no subject. Code that matched the old first line must check the error's `code` and `meta.unanswered` instead. detection: - glob: "**/*.{js,mjs,cjs,ts,mts,cts,sh,bash,yml,yaml}" + glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,sh,bash,yml,yaml}" matches: - - 'needs a statement, and the session is not interactive' - - 'subjects? need a statement, and the session is not interactive' - - 'needs a statement, which --yes cannot give' - - 'need a statement, which --yes cannot give' + - 'needs? a statement' + - 'which --yes cannot give' --- ## `engine-pin-moves-to-0-10-2` diff --git a/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md index 2c401b2721c5..86f785afa067 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md @@ -12,12 +12,10 @@ changes: summary: | When `prisma migration plan` or `prisma db update` cannot ask a statement question, the first line of `CLI.CONSENT_REQUIRED` is now one fixed sentence that names no subject. Code that matched the old first line must check the error's `code` and `meta.unanswered` instead. detection: - glob: "**/*.{js,mjs,cjs,ts,mts,cts,sh,bash,yml,yaml}" + glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,sh,bash,yml,yaml}" matches: - - 'needs a statement, and the session is not interactive' - - 'subjects? need a statement, and the session is not interactive' - - 'needs a statement, which --yes cannot give' - - 'need a statement, which --yes cannot give' + - 'needs? a statement' + - 'which --yes cannot give' --- ## `engine-pin-moves-to-0-10-2` From da80badce4b09a5e3d3464fc6a637c4da39b44a9 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:43:40 +1100 Subject: [PATCH 08/13] The spec shows the refusal engine 0.10.2 prints, says the command may suggest a rename but acts only on flags or answers, and links "statement" to "explicit consent" Signed-off-by: willbot Signed-off-by: Will Madden --- projects/migration-statements/spec.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/migration-statements/spec.md b/projects/migration-statements/spec.md index 635130b0fd7a..80a704c6327b 100644 --- a/projects/migration-statements/spec.md +++ b/projects/migration-statements/spec.md @@ -11,7 +11,7 @@ This project makes two things true. 1. **A command that would lose data stops first.** `migration plan` and `db update` stop before any change that would lose data, until the user has told the command what they intend. Dropping a table, dropping a column and changing a type in a way that loses values are examples. Removing an enum value or a value object field loses data too. 2. **The user tells it with a flag that uses the names in their contract.** `--rename Profile:User` means the model was renamed, so keep its rows. `--delete Legacy` means the model is gone, so drop its rows. `--convert User.age` and `--backfill User.email` say the user will write how the values change. The flags use the names in the user's contract: models, fields, enum values, value object fields and namespaces. A flag uses a table, collection or column name only for data that no model stores. -The command never guesses what the user intended, and nothing about intent is written into the contract source. In a terminal the command asks. In a script it stops with an error that prints the flags. +The command may suggest a likely rename, but it changes or drops data only as the user's flags or answers say, and nothing about intent is written into the contract source. In a terminal the command asks. In a script it stops with an error that prints the flags. The spec and the code call such a flag a *statement*, and the error calls a missing one *explicit consent*, the term the CLI Style Guide uses for statements and consent tokens alike ([Destructive operation confirmation](../../docs/CLI%20Style%20Guide.md#destructive-operation-confirmation)). This is the second attempt. The first stated intent in the contract source with `@@hint(was:)` and was shelved on 2026-10-05 as unintuitive. Its planner substrate is reused; its contract section is not. @@ -32,10 +32,10 @@ $ prisma migration plan --name tidy-users --rename Profile:User --rename User.na `migration.ts` carries `renameTable`, `renameColumn` and `dropTable` calls, the same file a user could write by hand. `prisma db update` with the same statements does the same against a live database. Without `--delete Legacy`, both commands refuse: ```text -✖ The plan would lose data. State what you mean about each operation: - Table "Legacy" would be dropped and its rows lost. - To rename it: --rename Legacy: - To delete it: --delete Legacy +✘ [CLI.CONSENT_REQUIRED] This command requires explicit consent, but it was not provided. + why: Drop table "Legacy" would lose the data of model "Legacy". +→ Run the command again with --rename 'Legacy:' +→ Run the command again with --delete Legacy ``` A type change gets the same treatment with its own statements: @@ -85,7 +85,7 @@ The reasoning and the alternatives rejected are in [`design-notes.md`](./design- ## Cross-cutting requirements -1. **Statements are the only source of intent.** The planner never infers a rename, never asks whether a drop is one, and never reads intent from the contract. A change with no statement is planned as the diff shows it, and refused if that loses data. +1. **Statements are the only source of intent.** The planner never acts on a guessed rename and never reads intent from the contract. A refusal may suggest a likely rename, but the plan renames or drops only what a statement says. A change with no statement is planned as the diff shows it, and refused if that loses data. 2. **Contract vocabulary only.** A statement names namespaces, models, fields and values as the contract source names them. The framework resolves every coordinate against the origin and destination contracts before any family code runs; the family receives resolved entities, never names to look up. 3. **One statement surface, both commands.** `migration plan` and `db update` accept the same statements with the same meaning, and the plan a statement produces is the same whichever command ran it. `db update` obtains its origin contract from the marker hash through the snapshot store. 4. **When a command stops, its error prints the flags that let it continue.** For each thing that would lose data, the error says what would be lost and prints each flag that answers it, written exactly as the user would type it, such as `--delete Legacy`. When a flag needs a new name that the user must choose, such as the new name of a renamed field, the error says so. The user copies a flag from the error, fills in any new name, and runs the command again. In a terminal the command asks the same thing as a question, once for each thing that would lose data. From 3bc1c9c02aa84d71f5d74bec3db3e0b557e64d70 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:44:48 +1100 Subject: [PATCH 09/13] Each problem from the 2026-11-23 manual QA has its own deferred entry, and the three that break a spec requirement say which Parts already covered by an existing entry are added to that entry instead: the next actions per flag, SQLite label quoting, the DDL preview, and the unused-flag advice. Signed-off-by: willbot Signed-off-by: Will Madden --- projects/migration-statements/deferred.md | 103 +++++++++++++++++----- 1 file changed, 82 insertions(+), 21 deletions(-) diff --git a/projects/migration-statements/deferred.md b/projects/migration-statements/deferred.md index 590fa782c2cb..5f97afddafcf 100644 --- a/projects/migration-statements/deferred.md +++ b/projects/migration-statements/deferred.md @@ -62,6 +62,8 @@ Adding a required field to a populated collection, or making an optional field r `CLI.CONSENT_REQUIRED` lists one `user-choice` next action per flag form ("Run the command again with --delete Legacy", another for the rename form), not grouped by subject and not a complete runnable command. Grouping the forms per subject and printing a full command would need the engine to know the invocation; raise it on prisma/prisma-cli once the statement prompt has shipped. +Manual QA on 2026-11-23 met the cost: with two models removed, the error prints four "Run the command again with …" lines as if any one were enough. The user needs one choice per model, and following one line refuses again for the other model. + ## SQL variants stored in their own tables **Found:** slice 4a design (2026-10-09). Will: SQL will need to handle multi-table storage of variants in the future. @@ -463,15 +465,15 @@ No pair is made when the control policy is not `managed` on both sides, so the p **Found:** stored-name renames manual QA, 2026-11-18. -PostgreSQL labels a table rename `Rename table "Shop Front" to "Store Front"`, and SQLite labels the same rename `Rename table Shop Front to Store Front`; column renames are `Rename column "users"."x" to "y"` against `Rename column x on users to y`. A name with a space or punctuation is hard to read in the SQLite label, and docs that quote a label have to name the target. The SQLite labels are set in `packages/3-targets/sqlite/1-target/src/core/migrations/op-factory-call.ts` (`RenameTableCall`, `RenameColumnCall` and the other calls) and predate the stored-name renames. Quoting them changes the expected labels in about twenty test and journey files across the SQLite target and adapter packages and `test/integration`, so it was left out of that pull request. Quote every SQLite label as PostgreSQL does, in one pass over all calls. +PostgreSQL labels a table rename `Rename table "Shop Front" to "Store Front"`, and SQLite labels the same rename `Rename table Shop Front to Store Front`; column renames are `Rename column "users"."x" to "y"` against `Rename column x on users to y`. A name with a space or punctuation is hard to read in the SQLite label, and docs that quote a label have to name the target. The same holds inside questions: manual QA on 2026-11-23 met "Recreate table user would lose the values of field "User.name".", while a dropped table is quoted (`Drop table "comment"`). The SQLite labels are set in `packages/3-targets/sqlite/1-target/src/core/migrations/op-factory-call.ts` (`RenameTableCall`, `RenameColumnCall` and the other calls) and predate the stored-name renames. Quoting them changes the expected labels in about twenty test and journey files across the SQLite target and adapter packages and `test/integration`, so it was left out of that pull request. Quote every SQLite label as PostgreSQL does, in one pass over all calls. ## Three texts the stored-name renames QA found outside its scope **Found:** stored-name renames manual QA, 2026-11-18. -- **`CLI.CONSENT_UNUSED` for a statement a stored-name change no longer needs.** `prisma migration plan --name move --from --delete Shop`, where only `@@map` of `Shop` changed, prints `✘ [CLI.CONSENT_UNUSED] --delete Shop was given but nothing in this run asked about Shop.` and `→ Remove the flag, or spell the subject the way the command names it.` The second half points the user at how the subject is written, which is not the cause: the model keeps its name, so the plan renames its table and asks nothing. The text should say that nothing asked about the subject and to remove the flag, and leave out the advice about how it is written when the subject is a model or field of the contract. +- **`CLI.CONSENT_UNUSED` for a statement a stored-name change no longer needs.** `prisma migration plan --name move --from --delete Shop`, where only `@@map` of `Shop` changed, prints `✘ [CLI.CONSENT_UNUSED] --delete Shop was given but nothing in this run asked about Shop.` and `→ Remove the flag, or spell the subject the way the command names it.` The second half points the user at how the subject is written, which is not the cause: the model keeps its name, so the plan renames its table and asks nothing. The text should say that nothing asked about the subject and to remove the flag, and leave out the advice about how it is written when the subject is a model or field of the contract. Manual QA on 2026-11-23 met the same text for a mistyped `--delete Nope.field`, where the advice about how the subject is written does fit; that the typo is reported only after planning is recorded under "A mistyped `--delete` subject is reported only after planning, as a flag that answers no question". - **Model names carry `public.` in refusals.** On PostgreSQL, refusals name models with their namespace, as in `The table of model "public.Cat" changes from "cats" to "dogs", and the schema being planned from already has table "dogs", the table of model "public.Dog"`, while the statements a user types name the model as `Cat`. The namespace prefix of the default namespace should be left out, as statements leave it out. -- **The DDL preview leaves out value rewrites.** `prisma migration plan` for a change of an enum's stored value prints the operations `Drop check constraint "task_level_check_bc15f0e6" on "task"`, `Replace value 1 with 2 in column "level" of "task"` and `Add check constraint "task_level_check_1d419f4a" on "task"`, but its `DDL preview` lists only the two `ALTER TABLE … DROP CONSTRAINT` and `ADD CONSTRAINT` statements, not the `UPDATE` that rewrites the value. The preview should show every statement the migration runs, or say that it shows only DDL. +- **The DDL preview leaves out value rewrites.** `prisma migration plan` for a change of an enum's stored value prints the operations `Drop check constraint "task_level_check_bc15f0e6" on "task"`, `Replace value 1 with 2 in column "level" of "task"` and `Add check constraint "task_level_check_1d419f4a" on "task"`, but its `DDL preview` lists only the two `ALTER TABLE … DROP CONSTRAINT` and `ADD CONSTRAINT` statements, not the `UPDATE` that rewrites the value. Manual QA on 2026-11-23 met the same fault on SQLite: the preview of a table rebuild shows `CREATE TABLE "_prisma_new_user"`, `DROP TABLE "user"` and the rename, but not the `INSERT … SELECT` that copies the rows, so it reads as if every row is dropped, though the data is kept. The preview should show every statement the migration runs, or say that it shows only DDL. ## No planner sets `leaveOut` any more @@ -511,21 +513,80 @@ The origin stores `User` in `users` with primary key `users_pkey`; the destinati The constraint rename is a companion inside the `renameTable` call, and running `migration.ts` again rebuilds the companions inside `this.renameTable(...)`, so it cannot simply move later in the plan. Two fixes: run a drop of a table no rename touches before the renames, or write that companion as its own call after the drop. This is a second case of the limit recorded under "A SQLite column rename followed by a table rebuild builds the replacement index twice": operations carry no dependency information. Until then the user drops the stale table first. -## Problems found by manual QA on 2026-11-23 - -**Found:** manual QA on SQLite (2026-11-23), run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problems that existed only in that version's layout of the refusal are left out, and the rest hold with 0.10.2. None is fixed. Each line says whether another entry already covers it. - -1. A value object field renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`: the first error says to add `--backfill GeoPoint.latitude`; the question that follows offers `--rename GeoPoint.lat:GeoPoint.latitude`; giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". That is false, since `latitude` is new; the real conflict is a rename and a backfill of the same field. New. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. -2. For that rename, `migration plan` first fails with "Migration planning failed" about the new required field, while `db update`, and `migration plan` on a model field, ask the question at once. The same change gives a different first error by command and by whether the field is in a model or a value object. Partly covered: "A value object field has no default, so `--backfill` has none to respect" explains why `migration plan` needs `--backfill`; the different first error is new. -3. With two models removed, the error prints four "Run the command again with …" lines as if any one were enough. The user needs one choice per model, and following one line refuses again for the other model. Covered by "The refusal's next actions are one line per flag, not grouped by subject". -4. A removed model or value object field with nothing to rename to is offered `--rename 'Comment:'` or `--rename 'GeoPoint.lng:GeoPoint.'`. The line cannot be run as printed, and run literally it fails with "has no field """. New. -5. When the run cannot ask, the question still says "If you answer delete, the existing objects get a temporary value …". There is nothing to answer; it should say "If you choose --delete GeoPoint.lat, …". The text comes from `plan-questions.ts`. New. -6. Value object locations are written as JSON paths and table names, such as `at path "$[*]" in column "history" of "site"`, where the user knows `Site.history`; "of "site"" does not even say it is a table. The planning failure lists the same places in a different order from the question. New. -7. A mistyped `--delete Nope.field` is reported only as "--delete Nope.field answers no question; the questions are about User.name.". After the user adds the right flag and keeps the typo, a second error says "Remove the flag, or spell the subject the way the command names it." A mistyped `--rename` target, by contrast, is rejected at once with a clear reason. The typo should be reported in the first error. Partly covered: "Three texts the stored-name renames QA found outside its scope" covers the "spell the subject" wording; reporting the typo first is new. -8. On SQLite a removed field's question starts "Recreate table user would lose the values of field "User.name".". Recreating the table is how SQLite makes the change, not what the user did, and the table name is not quoted, while a dropped table is (`Drop table "comment"`). Partly covered: "SQLite operation labels do not quote names" covers the quoting; naming the user's change instead of SQLite's step is new. -9. Messages use project terms a user does not know: "origin contract", "destination contract", "destination value object", "statement" (as in `Cannot resolve statement "--rename …"`), "postchecks already held", "contract space(s)", "self-emit", "attest the package". A user thinks of the old schema, the new schema and the `--rename` flag. Partly covered: "Statement errors say "rows" on MongoDB" asks for one pass over the statement errors' wording, and "Three texts the stored-name renames QA found outside its scope" covers "the subject"; the rest is new. -10. After `--delete User.name` on SQLite, both commands say "Applied 1 of 2 operation(s) …; the other 1 had nothing to do, since their postchecks already held". "the other 1 … their" is ungrammatical, and the user is shown a `Drop column "name" from "user"` step that does nothing because the table recreate already removed the column. New. The text is in `applied-summary.ts`; "A SQLite column rename followed by a table rebuild builds the replacement index twice" is a similar extra step after a rebuild. -11. The DDL preview of that migration shows `CREATE TABLE "_prisma_new_user"`, `DROP TABLE "user"` and the rename, but not the `INSERT … SELECT` that copies the rows, so it reads as if every row is dropped. It then shows `DROP COLUMN "name"` on a table that no longer has that column. The data is in fact kept. Partly covered: "Three texts the stored-name renames QA found outside its scope" records that the DDL preview leaves out value rewrites; the missing row copy is the same fault, and the extra drop is problem 10. -12. After `db update --delete User.name`, the warning about the temporary value says "To choose the value, plan a migration with prisma migration plan --from 33a42cee… --backfill User.displayName instead.". The update has already run, so "instead" comes too late, and the user does not know or easily check a 64-character hash. The text is in `migration-blocks.ts`. New. -13. Under `--yes` the refusal says "This command requires explicit consent, and --yes does not give it.", which is clear. A user may wonder whether to keep `--yes` when running the printed line again; keeping it works. New and minor. -14. In a terminal, `db update` prints each progress step twice, as a `▸` line and then a `✔` line, so four lines come before the error. `migration plan` prints none. New. +## A rename and a backfill of the same value object field fail with a false reason + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +A value object field is renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`. The first error says to add `--backfill GeoPoint.latitude`; the question that follows offers `--rename GeoPoint.lat:GeoPoint.latitude`. Giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". That is false, since `latitude` is new; the real conflict is a rename and a backfill of the same field. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. + +This breaks requirement 5 of the spec: "A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found." Here the error names a reason that is not true. + +## The first error for a new required value object field differs by command + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +For a value object field renamed from `GeoPoint.lat` to `GeoPoint.latitude`, `migration plan` first fails with "Migration planning failed" about the new required field, while `db update`, and `migration plan` on a model field, ask the question at once. So the same change gives a different first error depending on the command and on whether the field is in a model or a value object. Why `migration plan` needs `--backfill` here is explained under "A value object field has no default, so `--backfill` has none to respect"; the different first error is the new problem. + +## A rename with nothing to rename to is offered with `` + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +A removed model or value object field with nothing in the new contract to rename to is offered `--rename 'Comment:'` or `--rename 'GeoPoint.lng:GeoPoint.'`. The line cannot be run as printed, and run literally it fails with "has no field """. No name the user fills in can work either, because the new contract has nothing new to rename to. + +This breaks requirement 4 of the spec: "When a flag needs a new name that the user must choose, such as the new name of a renamed field, the error says so. The user copies a flag from the error, fills in any new name, and runs the command again." When nothing new exists, no new name the user fills in makes the printed rename run. + +## A question the run cannot ask still says "If you answer delete" + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +When the run cannot ask, the question still says "If you answer delete, the existing objects get a temporary value …". There is nothing to answer; it should say "If you choose --delete GeoPoint.lat, …". The text comes from `plan-questions.ts`. + +## Value object locations are written as JSON paths and table names + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +Value object locations are written as JSON paths and table names, such as `at path "$[*]" in column "history" of "site"`, where the user knows `Site.history`; "of "site"" does not even say it is a table. The planning failure lists the same places in a different order from the question. + +## A mistyped `--delete` subject is reported only after planning, as a flag that answers no question + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +A mistyped `--delete Nope.field` is reported only as "--delete Nope.field answers no question; the questions are about User.name.". After the user adds the right flag and keeps the typo, a second error says "Remove the flag, or spell the subject the way the command names it." A mistyped `--rename` target, by contrast, is rejected at once with a clear reason. The typo should be reported in the first error. The wording of the second error is covered under "Three texts the stored-name renames QA found outside its scope". + +This is a defect against requirement 5 of the spec: "A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found." `Nope.field` does not resolve in either contract, yet the command plans first and then reports the flag as unused. The documented design matches `--delete` and `--allow` values to questions through the engine (`CLI.CONSENT_UNUSED`) after planning; the requirement stays as written, and that order is the defect. + +## On SQLite a removed field's question names the table rebuild, not the user's change + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +On SQLite a removed field's question starts "Recreate table user would lose the values of field "User.name".". Recreating the table is how SQLite makes the change, not what the user did; the question should name the user's change, the removed field. The missing quotes around `user` are covered under "SQLite operation labels do not quote names". + +## Messages use project terms a user does not know + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +Messages use project terms a user does not know: "origin contract", "destination contract", "destination value object", "statement" (as in `Cannot resolve statement "--rename …"`), "postchecks already held", "contract space(s)", "self-emit", "attest the package". A user thinks of the old schema, the new schema and the `--rename` flag. The pass over the statement errors' wording asked for under "Statement errors say "rows" on MongoDB" should cover these terms too. + +## After a SQLite table rebuild, the applied summary is ungrammatical and counts a step that does nothing + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +After `--delete User.name` on SQLite, both commands say "Applied 1 of 2 operation(s) …; the other 1 had nothing to do, since their postchecks already held". "the other 1 … their" is ungrammatical. The user is also shown a `Drop column "name" from "user"` step that does nothing, because the table recreate already removed the column; the DDL preview shows the same extra `DROP COLUMN "name"`. The text is in `applied-summary.ts`. "A SQLite column rename followed by a table rebuild builds the replacement index twice" is a similar extra step after a rebuild. + +## After `db update`, the temporary-value warning says "instead" and names a hash + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +After `db update --delete User.name`, the warning about the temporary value says "To choose the value, plan a migration with prisma migration plan --from 33a42cee… --backfill User.displayName instead.". The update has already run, so "instead" comes too late, and the user does not know or easily check a 64-character hash. The text is in `migration-blocks.ts`. + +## Whether to keep `--yes` when running the printed line again is not said + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +Under `--yes` the refusal says "This command requires explicit consent, and --yes does not give it.", which is clear. A user may wonder whether to keep `--yes` when running the printed line again; keeping it works. Minor. + +## In a terminal, `db update` prints each progress step twice + +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. + +In a terminal, `db update` prints each progress step twice, as a `▸` line and then a `✔` line, so four lines come before the error. `migration plan` prints none. From 4f78597006889e7859e93c2098ba85d06d4ef96c Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:53:35 +1100 Subject: [PATCH 10/13] The spec again says the command never guesses, and the deferred list records where the product and the spec disagree as open questions The purpose and the first requirement are back to their earlier text. The example refusal says it is what a script sees, ends with its docs line, and points to the deferred entry about the rename it offers. The deferred list adds the rename-suggestion question and the engine refusal for --confirm, says the rename-plus-backfill refusal is right and only its wording is wrong, states both sides of when a mistyped --delete should be reported, and says which engine version printed the quoted text. Signed-off-by: willbot Signed-off-by: Will Madden --- projects/migration-statements/deferred.md | 40 ++++++++++++++++++----- projects/migration-statements/spec.md | 9 +++-- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/projects/migration-statements/deferred.md b/projects/migration-statements/deferred.md index 5f97afddafcf..61ebef9a6b35 100644 --- a/projects/migration-statements/deferred.md +++ b/projects/migration-statements/deferred.md @@ -513,13 +513,13 @@ The origin stores `User` in `users` with primary key `users_pkey`; the destinati The constraint rename is a companion inside the `renameTable` call, and running `migration.ts` again rebuilds the companions inside `this.renameTable(...)`, so it cannot simply move later in the plan. Two fixes: run a drop of a table no rename touches before the renames, or write that companion as its own call after the drop. This is a second case of the limit recorded under "A SQLite column rename followed by a table rebuild builds the replacement index twice": operations carry no dependency information. Until then the user drops the stale table first. -## A rename and a backfill of the same value object field fail with a false reason +## A rename and a backfill of the same value object field are rightly refused, with a misleading message **Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. -A value object field is renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`. The first error says to add `--backfill GeoPoint.latitude`; the question that follows offers `--rename GeoPoint.lat:GeoPoint.latitude`. Giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". That is false, since `latitude` is new; the real conflict is a rename and a backfill of the same field. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. +A value object field is renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`. The first error says to add `--backfill GeoPoint.latitude`; the question that follows offers `--rename GeoPoint.lat:GeoPoint.latitude`. Giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". -This breaks requirement 5 of the spec: "A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found." Here the error names a reason that is not true. +Refusing is right. `resolve-statements.ts` maps `latitude` back to `lat` through the rename, finds `lat` required in the origin contract, and refuses the backfill. After the rename every existing value has `latitude`, carrying the value of `lat`, so there is nothing to backfill. Only the wording is wrong: it names `GeoPoint.latitude` as if the origin contract had it and does not mention the rename. It should say that `--rename GeoPoint.lat:GeoPoint.latitude` keeps every value, so `--backfill GeoPoint.latitude` is not needed. Do not make the command accept both flags. The user was led into giving both by the first error, which is the next entry. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. ## The first error for a new required value object field differs by command @@ -535,6 +535,18 @@ A removed model or value object field with nothing in the new contract to rename This breaks requirement 4 of the spec: "When a flag needs a new name that the user must choose, such as the new name of a renamed field, the error says so. The user copies a flag from the error, fills in any new name, and runs the command again." When nothing new exists, no new name the user fills in makes the printed rename run. +## The error suggests a rename target, while the spec says the command never guesses + +**Found:** second-round review of the move to `@prisma/cli-engine` 0.10.2, 2026-11-23. This is an open question for Will, not a known defect. + +When exactly one new model, field, enum value or value object field could be the target, the refusal and the question fill it into the rename flag, for example `--rename GeoPoint.lat:GeoPoint.latitude`. Otherwise they print ``. The code is `renameForm` in `packages/1-framework/3-tooling/cli/src/control-api/statements/plan-questions.ts`; the Migration System subsystem doc describes it too. + +The spec says otherwise in four places. Its purpose says "The command never guesses what the user intended". Requirement 1 says "The planner never infers a rename, never asks whether a drop is one, and never reads intent from the contract." The second decision settled on 2026-10-05 says "There is no prompt that guesses whether a drop is a rename, and no detection of candidate pairs", and that "the rule is that nothing is guessed". The first non-goal says "no rename detection from matching columns or any other heuristic". Picking the only new field is a simple way to find a candidate pair. + +On the other side: nothing is renamed or dropped unless the user gives the flag or answers the question. The suggestion only fills in text the user would otherwise type, and the command acts on it only when the user runs it. + +Whether a suggestion printed in the error counts as guessing is undecided, and it is Will's to decide. If it does not, the spec's decision and non-goal need a dated amendment that says so. If it does, `renameForm` should always print ``. + ## A question the run cannot ask still says "If you answer delete" **Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. @@ -549,11 +561,17 @@ Value object locations are written as JSON paths and table names, such as `at pa ## A mistyped `--delete` subject is reported only after planning, as a flag that answers no question -**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1, whose first error said "--delete Nope.field does not name User.name."; the text quoted below is what 0.10.2 prints. -A mistyped `--delete Nope.field` is reported only as "--delete Nope.field answers no question; the questions are about User.name.". After the user adds the right flag and keeps the typo, a second error says "Remove the flag, or spell the subject the way the command names it." A mistyped `--rename` target, by contrast, is rejected at once with a clear reason. The typo should be reported in the first error. The wording of the second error is covered under "Three texts the stored-name renames QA found outside its scope". +A mistyped `--delete Nope.field` is reported only as "--delete Nope.field answers no question; the questions are about User.name.". After the user adds the right flag and keeps the typo, a second error says "Remove the flag, or spell the subject the way the command names it." A mistyped `--rename` target, by contrast, is rejected at once with a clear reason. The wording of the second error is covered under "Three texts the stored-name renames QA found outside its scope". -This is a defect against requirement 5 of the spec: "A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found." `Nope.field` does not resolve in either contract, yet the command plans first and then reports the flag as unused. The documented design matches `--delete` and `--allow` values to questions through the engine (`CLI.CONSENT_UNUSED`) after planning; the requirement stays as written, and that order is the defect. +The project's documents disagree about when this should be reported, and which one changes is undecided. + +- Requirement 5 of the spec says a typo like this fails before planning: "A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found." `Nope.field` resolves in neither contract. +- The Migration System subsystem doc (`docs/architecture docs/subsystems/7. Migration System.md`, the paragraphs "The questions." and "Questions before an apply.") and the error reference (`docs/reference/error-reference.md`, `CLI.CONSENT_UNUSED`) describe the current order as the design. The planner asks one question per thing the plan would lose, and "a `--delete` or `--allow` that answers no question fails with `CLI.CONSENT_UNUSED`; both happen before anything is written or applied", that is, after planning. The error reference gives "a mistyped name" as an example. +- The reason for that order: a `--delete` value can name a table no model stores, such as `--delete billing.audit_log`. Such a table is known only once the plan has found it, so `--delete` values cannot all be resolved before planning. Resolving every `--delete` value up front would break those deletes. + +One way to reconcile them is to narrow the requirement so that `--delete` and `--allow` values are matched after planning. Another is to keep it and resolve before planning only `--delete` values written as a model or field name, leaving table names to be matched after planning; then the subsystem doc and error reference need changing. Either way the first error should name the typo more clearly. ## On SQLite a removed field's question names the table rebuild, not the user's change @@ -581,12 +599,18 @@ After `db update --delete User.name`, the warning about the temporary value says ## Whether to keep `--yes` when running the printed line again is not said -**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. +**Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1, whose refusal under `--yes` said "You have to choose what happens, and --yes does not choose for you."; the problem holds with 0.10.2. -Under `--yes` the refusal says "This command requires explicit consent, and --yes does not give it.", which is clear. A user may wonder whether to keep `--yes` when running the printed line again; keeping it works. Minor. +Under `--yes` the 0.10.2 refusal says "This command requires explicit consent, and --yes does not give it.", which is clear. A user may wonder whether to keep `--yes` when running the printed line again; keeping it works. Minor. ## In a terminal, `db update` prints each progress step twice **Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. In a terminal, `db update` prints each progress step twice, as a `▸` line and then a `✔` line, so four lines come before the error. `migration plan` prints none. + +## The engine's refusal for `--confirm` begins with a different sentence + +**Found:** second-round review of the move to `@prisma/cli-engine` 0.10.2, 2026-11-23. + +Engine 0.10.2 changed the first line of the refusal for unanswered questions to "This command requires explicit consent, but it was not provided." The engine's other consent refusal, for a command that takes `--confirm` (`consentUnavailable` in the engine), still begins with the question, as in `"" requires explicit consent, and the session is not interactive.`, or `…, which --yes cannot grant.` under `--yes`. So the two refusals with the same code, `CLI.CONSENT_REQUIRED`, open with different sentences. The text is the engine's, so a change belongs in prisma/prisma-cli. diff --git a/projects/migration-statements/spec.md b/projects/migration-statements/spec.md index 80a704c6327b..a8b67cde6913 100644 --- a/projects/migration-statements/spec.md +++ b/projects/migration-statements/spec.md @@ -11,7 +11,7 @@ This project makes two things true. 1. **A command that would lose data stops first.** `migration plan` and `db update` stop before any change that would lose data, until the user has told the command what they intend. Dropping a table, dropping a column and changing a type in a way that loses values are examples. Removing an enum value or a value object field loses data too. 2. **The user tells it with a flag that uses the names in their contract.** `--rename Profile:User` means the model was renamed, so keep its rows. `--delete Legacy` means the model is gone, so drop its rows. `--convert User.age` and `--backfill User.email` say the user will write how the values change. The flags use the names in the user's contract: models, fields, enum values, value object fields and namespaces. A flag uses a table, collection or column name only for data that no model stores. -The command may suggest a likely rename, but it changes or drops data only as the user's flags or answers say, and nothing about intent is written into the contract source. In a terminal the command asks. In a script it stops with an error that prints the flags. The spec and the code call such a flag a *statement*, and the error calls a missing one *explicit consent*, the term the CLI Style Guide uses for statements and consent tokens alike ([Destructive operation confirmation](../../docs/CLI%20Style%20Guide.md#destructive-operation-confirmation)). +The command never guesses what the user intended, and nothing about intent is written into the contract source. In a terminal the command asks. In a script it stops with an error that prints the flags. The spec and the code call such a flag a *statement*, and the error calls a missing one *explicit consent*, the term the CLI Style Guide uses for statements and consent tokens alike ([Destructive operation confirmation](../../docs/CLI%20Style%20Guide.md#destructive-operation-confirmation)). This is the second attempt. The first stated intent in the contract source with `@@hint(was:)` and was shelved on 2026-10-05 as unintuitive. Its planner substrate is reused; its contract section is not. @@ -29,15 +29,18 @@ $ prisma migration plan --name tidy-users --rename Profile:User --rename User.na Drop table "Legacy" destructive ``` -`migration.ts` carries `renameTable`, `renameColumn` and `dropTable` calls, the same file a user could write by hand. `prisma db update` with the same statements does the same against a live database. Without `--delete Legacy`, both commands refuse: +`migration.ts` carries `renameTable`, `renameColumn` and `dropTable` calls, the same file a user could write by hand. `prisma db update` with the same statements does the same against a live database. Without `--delete Legacy`, both commands refuse. In a terminal they ask instead; this is what a script sees: ```text ✘ [CLI.CONSENT_REQUIRED] This command requires explicit consent, but it was not provided. why: Drop table "Legacy" would lose the data of model "Legacy". → Run the command again with --rename 'Legacy:' → Run the command again with --delete Legacy + docs: https://docs.prisma.io/docs/orm/v8/reference/error-reference/CLI.CONSENT_REQUIRED ``` +The `--rename 'Legacy:'` line cannot be run as printed: once `Profile:User` is taken, the new contract has no new model to rename `Legacy` to. This is recorded in [`deferred.md`](./deferred.md) under "A rename with nothing to rename to is offered with ``". + A type change gets the same treatment with its own statements: ```text @@ -85,7 +88,7 @@ The reasoning and the alternatives rejected are in [`design-notes.md`](./design- ## Cross-cutting requirements -1. **Statements are the only source of intent.** The planner never acts on a guessed rename and never reads intent from the contract. A refusal may suggest a likely rename, but the plan renames or drops only what a statement says. A change with no statement is planned as the diff shows it, and refused if that loses data. +1. **Statements are the only source of intent.** The planner never infers a rename, never asks whether a drop is one, and never reads intent from the contract. A change with no statement is planned as the diff shows it, and refused if that loses data. 2. **Contract vocabulary only.** A statement names namespaces, models, fields and values as the contract source names them. The framework resolves every coordinate against the origin and destination contracts before any family code runs; the family receives resolved entities, never names to look up. 3. **One statement surface, both commands.** `migration plan` and `db update` accept the same statements with the same meaning, and the plan a statement produces is the same whichever command ran it. `db update` obtains its origin contract from the marker hash through the snapshot store. 4. **When a command stops, its error prints the flags that let it continue.** For each thing that would lose data, the error says what would be lost and prints each flag that answers it, written exactly as the user would type it, such as `--delete Legacy`. When a flag needs a new name that the user must choose, such as the new name of a renamed field, the error says so. The user copies a flag from the error, fills in any new name, and runs the command again. In a terminal the command asks the same thing as a question, once for each thing that would lose data. From 975b2887db387fd4cdb2827a35f2aaf83f2c3570 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:53:36 +1100 Subject: [PATCH 11/13] The upgrade note for engine 0.10.2 also finds the old --yes text when it does not start at "which" Signed-off-by: willbot Signed-off-by: Will Madden --- .../pending/cli-engine-0-10-2/app/instructions.md | 2 +- .../pending/cli-engine-0-10-2/extension/instructions.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md index 3996067f21d8..1a95a5eb7e02 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md @@ -15,7 +15,7 @@ changes: glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,sh,bash,yml,yaml}" matches: - 'needs? a statement' - - 'which --yes cannot give' + - '--yes cannot give' --- ## `engine-pin-moves-to-0-10-2` diff --git a/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md index 86f785afa067..51f201142372 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md @@ -15,7 +15,7 @@ changes: glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,sh,bash,yml,yaml}" matches: - 'needs? a statement' - - 'which --yes cannot give' + - '--yes cannot give' --- ## `engine-pin-moves-to-0-10-2` From ea75b9f0f6d877b366303784f01e481289563111 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 12:59:32 +1100 Subject: [PATCH 12/13] Four deferred entries state the facts the last review corrected The rename and backfill entry quotes the first error as it is printed. The rename suggestion entry says an ordinary model never gets a suggested target. The mistyped --delete entry gives the second reason deletes are matched after planning. The --confirm entry says the move to engine 0.10.2 is what made the two refusals differ. Signed-off-by: willbot Signed-off-by: Will Madden --- projects/migration-statements/deferred.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/migration-statements/deferred.md b/projects/migration-statements/deferred.md index 61ebef9a6b35..95614f75f7aa 100644 --- a/projects/migration-statements/deferred.md +++ b/projects/migration-statements/deferred.md @@ -517,9 +517,9 @@ The constraint rename is a companion inside the `renameTable` call, and running **Found:** manual QA on SQLite, 2026-11-23, run as a user who knows their models and fields. The run used `@prisma/cli-engine` 0.10.1; the problem holds with 0.10.2. -A value object field is renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`. The first error says to add `--backfill GeoPoint.latitude`; the question that follows offers `--rename GeoPoint.lat:GeoPoint.latitude`. Giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". +A value object field is renamed from `GeoPoint.lat` to `GeoPoint.latitude`, through `migration plan`. The first error offers both flags as alternatives: "If it is a field renamed, add --rename GeoPoint.lat:GeoPoint.latitude. Otherwise add --backfill …". Giving both fails with "The field "GeoPoint.latitude" is already required in the origin contract, so every existing value has it". -Refusing is right. `resolve-statements.ts` maps `latitude` back to `lat` through the rename, finds `lat` required in the origin contract, and refuses the backfill. After the rename every existing value has `latitude`, carrying the value of `lat`, so there is nothing to backfill. Only the wording is wrong: it names `GeoPoint.latitude` as if the origin contract had it and does not mention the rename. It should say that `--rename GeoPoint.lat:GeoPoint.latitude` keeps every value, so `--backfill GeoPoint.latitude` is not needed. Do not make the command accept both flags. The user was led into giving both by the first error, which is the next entry. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. +Refusing is right. `resolve-statements.ts` maps `latitude` back to `lat` through the rename, finds `lat` required in the origin contract, and refuses the backfill. After the rename every existing value has `latitude`, carrying the value of `lat`, so there is nothing to backfill. Only the wording is wrong: it names `GeoPoint.latitude` as if the origin contract had it and does not mention the rename. That wording falls short of the spec's requirement that such an error names "what was searched and what was found", because the origin contract has no `GeoPoint.latitude`. It should say that `--rename GeoPoint.lat:GeoPoint.latitude` keeps every value, so `--backfill GeoPoint.latitude` is not needed. Do not make the command accept both flags. "Statement errors say "rows" on MongoDB" quotes the same message, but only for its wording. ## The first error for a new required value object field differs by command @@ -539,7 +539,7 @@ This breaks requirement 4 of the spec: "When a flag needs a new name that the us **Found:** second-round review of the move to `@prisma/cli-engine` 0.10.2, 2026-11-23. This is an open question for Will, not a known defect. -When exactly one new model, field, enum value or value object field could be the target, the refusal and the question fill it into the rename flag, for example `--rename GeoPoint.lat:GeoPoint.latitude`. Otherwise they print ``. The code is `renameForm` in `packages/1-framework/3-tooling/cli/src/control-api/statements/plan-questions.ts`; the Migration System subsystem doc describes it too. +When exactly one new field, enum value or value object field could be the target, the refusal and the question fill it into the rename flag, for example `--rename GeoPoint.lat:GeoPoint.latitude`. For a model this happens only when the removed model is a variant and its base gained exactly one new variant; an ordinary model always gets ``. In every other case they print ``. The code is `renameForm` in `packages/1-framework/3-tooling/cli/src/control-api/statements/plan-questions.ts`; the Migration System subsystem doc describes it too. The spec says otherwise in four places. Its purpose says "The command never guesses what the user intended". Requirement 1 says "The planner never infers a rename, never asks whether a drop is one, and never reads intent from the contract." The second decision settled on 2026-10-05 says "There is no prompt that guesses whether a drop is a rename, and no detection of candidate pairs", and that "the rule is that nothing is guessed". The first non-goal says "no rename detection from matching columns or any other heuristic". Picking the only new field is a simple way to find a candidate pair. @@ -569,9 +569,9 @@ The project's documents disagree about when this should be reported, and which o - Requirement 5 of the spec says a typo like this fails before planning: "A coordinate that does not resolve in the contract it must resolve in, a rename whose new name already exists in the origin, a statement the control policy forbids, or a rename and convert statement with no origin contract: each fails before anything is planned, naming what was searched and what was found." `Nope.field` resolves in neither contract. - The Migration System subsystem doc (`docs/architecture docs/subsystems/7. Migration System.md`, the paragraphs "The questions." and "Questions before an apply.") and the error reference (`docs/reference/error-reference.md`, `CLI.CONSENT_UNUSED`) describe the current order as the design. The planner asks one question per thing the plan would lose, and "a `--delete` or `--allow` that answers no question fails with `CLI.CONSENT_UNUSED`; both happen before anything is written or applied", that is, after planning. The error reference gives "a mistyped name" as an example. -- The reason for that order: a `--delete` value can name a table no model stores, such as `--delete billing.audit_log`. Such a table is known only once the plan has found it, so `--delete` values cannot all be resolved before planning. Resolving every `--delete` value up front would break those deletes. +- The reason for that order: a `--delete` value can name a table no model stores, such as `--delete billing.audit_log`. Such a table is known only once the plan has found it, so `--delete` values cannot all be resolved before planning. Resolving every `--delete` value up front would break those deletes. A second reason is in the doc comment on `resolveStatements`: `--delete` must work when there is no origin contract, which the spec also decides, and then there is nothing to resolve a model or field name against before planning. -One way to reconcile them is to narrow the requirement so that `--delete` and `--allow` values are matched after planning. Another is to keep it and resolve before planning only `--delete` values written as a model or field name, leaving table names to be matched after planning; then the subsystem doc and error reference need changing. Either way the first error should name the typo more clearly. +One way to reconcile them is to narrow the requirement so that `--delete` and `--allow` values are matched after planning. Another is to keep it and resolve before planning only `--delete` values written as a model or field name, leaving table names to be matched after planning, and only when an origin contract exists; then the subsystem doc and error reference need changing. Either way the first error should name the typo more clearly. ## On SQLite a removed field's question names the table rebuild, not the user's change @@ -613,4 +613,4 @@ In a terminal, `db update` prints each progress step twice, as a `▸` line and **Found:** second-round review of the move to `@prisma/cli-engine` 0.10.2, 2026-11-23. -Engine 0.10.2 changed the first line of the refusal for unanswered questions to "This command requires explicit consent, but it was not provided." The engine's other consent refusal, for a command that takes `--confirm` (`consentUnavailable` in the engine), still begins with the question, as in `"" requires explicit consent, and the session is not interactive.`, or `…, which --yes cannot grant.` under `--yes`. So the two refusals with the same code, `CLI.CONSENT_REQUIRED`, open with different sentences. The text is the engine's, so a change belongs in prisma/prisma-cli. +Engine 0.10.2 changed the first line of the refusal for unanswered questions to "This command requires explicit consent, but it was not provided." The engine's other consent refusal, for a command that takes `--confirm` (`consentUnavailable` in the engine), still begins with the question, as in `"" requires explicit consent, and the session is not interactive.`, or `…, which --yes cannot grant.` under `--yes`. So the two refusals with the same code, `CLI.CONSENT_REQUIRED`, open with different sentences. With engine 0.10.0 both began with the quoted question; the move to 0.10.2 is what made them differ. The text is the engine's, so a change belongs in prisma/prisma-cli. From 228eba1a98fb822fbe3d22d2a24b8a41f6e1cd9d Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 23 Nov 2026 13:08:09 +1100 Subject: [PATCH 13/13] The engine 0.10.2 upgrade note also finds version ranges, JSON fixtures and matches on the words 'session is not interactive' Signed-off-by: willbot Signed-off-by: Will Madden --- .../pending/cli-engine-0-10-2/app/instructions.md | 7 ++++--- .../pending/cli-engine-0-10-2/extension/instructions.md | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md index 1a95a5eb7e02..3a767b17a62a 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-2/app/instructions.md @@ -7,15 +7,16 @@ changes: glob: "**/{package.json,pnpm-workspace.yaml}" matches: - '"@prisma/cli-engine":\s*"[^"]*(?]=?\s*)?0\.(?:\d|10\.[01])(?!\d)' - id: consent-required-summary-names-no-subject summary: | When `prisma migration plan` or `prisma db update` cannot ask a statement question, the first line of `CLI.CONSENT_REQUIRED` is now one fixed sentence that names no subject. Code that matched the old first line must check the error's `code` and `meta.unanswered` instead. detection: - glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,sh,bash,yml,yaml}" + glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,json,sh,bash,yml,yaml}" matches: - 'needs? a statement' - '--yes cannot give' + - 'session is not interactive' --- ## `engine-pin-moves-to-0-10-2` @@ -31,4 +32,4 @@ When `prisma migration plan` or `prisma db update` would lose data or change acc `why` (the questions), the next actions, `meta`, the code and the exit code (2) are unchanged. -For every file matched by `detection`, stop matching the first line of this error. Branch on the error's `code` (`CLI.CONSENT_REQUIRED`) and read the unanswered subjects from `meta.unanswered` (each with its `subject` and `verbs`). +For every file matched by `detection`, stop matching the first line of this error. A match on `session is not interactive` needs a change only where it is for this error: the error for a missing `--confirm` still ends with those words. Branch on the error's `code` (`CLI.CONSENT_REQUIRED`) and read the unanswered subjects from `meta.unanswered` (each with its `subject` and `verbs`). diff --git a/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md b/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md index 51f201142372..28dd15a4f61e 100644 --- a/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md +++ b/upgrade-instructions/pending/cli-engine-0-10-2/extension/instructions.md @@ -7,15 +7,16 @@ changes: glob: "**/{package.json,pnpm-workspace.yaml}" matches: - '"@prisma/cli-engine":\s*"[^"]*(?]=?\s*)?0\.(?:\d|10\.[01])(?!\d)' - id: consent-required-summary-names-no-subject summary: | When `prisma migration plan` or `prisma db update` cannot ask a statement question, the first line of `CLI.CONSENT_REQUIRED` is now one fixed sentence that names no subject. Code that matched the old first line must check the error's `code` and `meta.unanswered` instead. detection: - glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,sh,bash,yml,yaml}" + glob: "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,snap,json,sh,bash,yml,yaml}" matches: - 'needs? a statement' - '--yes cannot give' + - 'session is not interactive' --- ## `engine-pin-moves-to-0-10-2` @@ -31,4 +32,4 @@ When `prisma migration plan` or `prisma db update` would lose data or change acc `why` (the questions), the next actions, `meta`, the code and the exit code (2) are unchanged. -For every file matched by `detection`, stop matching the first line of this error. Branch on the error's `code` (`CLI.CONSENT_REQUIRED`) and read the unanswered subjects from `meta.unanswered` (each with its `subject` and `verbs`). +For every file matched by `detection`, stop matching the first line of this error. A match on `session is not interactive` needs a change only where it is for this error: the error for a missing `--confirm` still ends with those words. Branch on the error's `code` (`CLI.CONSENT_REQUIRED`) and read the unanswered subjects from `meta.unanswered` (each with its `subject` and `verbs`).