From e9238325ceb043f1e3834cb1235d6466f8834595 Mon Sep 17 00:00:00 2001 From: willbot Date: Tue, 29 Sep 2026 13:39:59 +0200 Subject: [PATCH 1/2] docs(docs): update Prisma ORM 8 pages for prisma 8.0.0-rc.19 and orm-postgres 8.0.0-rc.13 Document the nulls option of orderBy() in the SQL query builder, replace the stale executionHash in the GitHub Actions guide, and update version numbers to the current releases. The version check now takes the expected @prisma/cli-engine version from the dependencies of prisma@latest, because that is the version a reader installs. Co-Authored-By: Claude Fable 5.1 Signed-off-by: willbot Signed-off-by: Will Madden --- apps/docs/AGENTS.md | 2 +- .../docs/(index)/prisma-orm/from-scratch.mdx | 2 +- .../guides/deployment/cloudflare-workers.mdx | 2 +- .../content/docs/guides/deployment/docker.mdx | 2 +- .../guides/deployment/pnpm-workspaces.mdx | 4 +- .../docs/guides/frameworks/react-router-7.mdx | 2 +- .../docs/guides/frameworks/solid-start.mdx | 6 +-- .../guides/integrations/github-actions.mdx | 2 +- .../switch-to-prisma-orm/from-drizzle.mdx | 2 +- .../switch-to-prisma-orm/from-mongoose.mdx | 4 +- .../guides/upgrade-prisma-orm/postgresql.mdx | 4 +- .../docs/orm/reference/sql-query-builder.mdx | 24 ++++++---- apps/docs/content/docs/orm/release-status.mdx | 4 +- apps/docs/scripts/lint-versions.ts | 45 +++++++++++++------ 14 files changed, 66 insertions(+), 39 deletions(-) diff --git a/apps/docs/AGENTS.md b/apps/docs/AGENTS.md index 909e122554..cfd8a6bab7 100644 --- a/apps/docs/AGENTS.md +++ b/apps/docs/AGENTS.md @@ -35,4 +35,4 @@ Run from `apps/docs`: 2. `pnpm audit:redirects:strict` after adding redirects. 3. `pnpm lint:agent-ready` after touching sections, llms surfaces, or the OpenAPI explorer. 4. `pnpm types:check` and `pnpm build` for code changes. -5. `pnpm lint:versions` after pinning a Prisma package version. Every pin in the current docs must be the package's `latest` on npm; write "since `8.0.0-rc.10`" or use an "Added in" column for history. +5. `pnpm lint:versions` after pinning a Prisma package version. Every pin in the current docs must be the package's `latest` on npm, except `@prisma/cli-engine`, which must be the version that `prisma@latest` depends on; write "since `8.0.0-rc.10`" or use an "Added in" column for history. diff --git a/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx b/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx index ee98e2848e..b15f20ad57 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx @@ -43,7 +43,7 @@ npm install @prisma/orm-postgres dotenv npm install --save-dev prisma tsx typescript ``` -`@prisma/orm-postgres` is the library your code imports, and `prisma` is the command-line tool. `dotenv` loads `.env`, `tsx` runs `index.ts` without a build step, and `typescript` 5.9 or newer is a peer dependency of `@prisma/orm-postgres`. The two Prisma packages have different version numbers (for example, `prisma` 8.0.0-rc.17 and `@prisma/orm-postgres` 8.0.0-rc.13); that is normal, and any two `latest` versions work together. +`@prisma/orm-postgres` is the library your code imports, and `prisma` is the command-line tool. `dotenv` loads `.env`, `tsx` runs `index.ts` without a build step, and `typescript` 5.9 or newer is a peer dependency of `@prisma/orm-postgres`. The two Prisma packages have different version numbers (for example, `prisma` 8.0.0-rc.19 and `@prisma/orm-postgres` 8.0.0-rc.13); that is normal, and any two `latest` versions work together. ## 2. Create the config file and `.env` diff --git a/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx b/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx index 525209644b..fb7f131e20 100644 --- a/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx +++ b/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx @@ -95,7 +95,7 @@ Without `--yes`, the command asks for the contract authoring style and the schem ```json no-copy {"kind":"step-finished","step":"npm add @prisma/orm-postgres dotenv","outcome":"ok"} {"kind":"step-finished","step":"npm add -D prisma@latest","outcome":"ok"} -{"kind":"step-finished","step":"npm add -D @prisma/cli-engine@0.6.1","outcome":"ok"} +{"kind":"step-finished","step":"npm add -D @prisma/cli-engine@0.6.2","outcome":"ok"} {"kind":"step-finished","step":"Emit the contract","outcome":"ok"} {"kind":"result","envelope":{"ok":true,"result":{"target":"postgres","authoring":"psl","schemaPath":"src/prisma/contract.prisma","filesWritten":["src/prisma/contract.prisma","prisma.config.ts","src/prisma/db.ts","prisma-8.md",".env.example","tsconfig.json",".gitignore",".gitattributes","package.json","README.md"]}}} ``` diff --git a/apps/docs/content/docs/guides/deployment/docker.mdx b/apps/docs/content/docs/guides/deployment/docker.mdx index 5295168a42..ffbe6ed159 100644 --- a/apps/docs/content/docs/guides/deployment/docker.mdx +++ b/apps/docs/content/docs/guides/deployment/docker.mdx @@ -90,7 +90,7 @@ package.json declares "type": "commonjs" ... the scaffolded prisma/db.ts uses an If you want the default, set "type": "module" in package.json. ✔ npm add @prisma/orm-postgres dotenv ✔ npm add -D prisma@latest @types/node -✔ npm add -D @prisma/cli-engine@0.6.1 +✔ npm add -D @prisma/cli-engine@0.6.2 ✔ Emit the contract │ target: postgres │ authoring: psl diff --git a/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx b/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx index 406615f82a..55093b30ef 100644 --- a/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx +++ b/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx @@ -95,8 +95,8 @@ Answer the prompts: choose `PSL` for the authoring style and keep the other defa ✔ pnpm add @prisma/orm-postgres dotenv ▸ pnpm add -D prisma@latest @types/node ✔ pnpm add -D prisma@latest @types/node -▸ pnpm add -D @prisma/cli-engine@0.6.1 -✔ pnpm add -D @prisma/cli-engine@0.6.1 +▸ pnpm add -D @prisma/cli-engine@0.6.2 +✔ pnpm add -D @prisma/cli-engine@0.6.2 ▸ Emit the contract ✔ Emit the contract │ target: postgres diff --git a/apps/docs/content/docs/guides/frameworks/react-router-7.mdx b/apps/docs/content/docs/guides/frameworks/react-router-7.mdx index 296658acfc..90b1499905 100644 --- a/apps/docs/content/docs/guides/frameworks/react-router-7.mdx +++ b/apps/docs/content/docs/guides/frameworks/react-router-7.mdx @@ -88,7 +88,7 @@ npx prisma@latest orm init --yes --target postgres --authoring psl Updated tsconfig.json with required compiler options. npm add @prisma/orm-postgres dotenv npm add -D prisma@latest -npm add -D @prisma/cli-engine@0.6.1 +npm add -D @prisma/cli-engine@0.6.2 Emit the contract filesWritten: src/prisma/contract.prisma, prisma.config.ts, src/prisma/db.ts, diff --git a/apps/docs/content/docs/guides/frameworks/solid-start.mdx b/apps/docs/content/docs/guides/frameworks/solid-start.mdx index e9d0bcbeaa..4234a3c642 100644 --- a/apps/docs/content/docs/guides/frameworks/solid-start.mdx +++ b/apps/docs/content/docs/guides/frameworks/solid-start.mdx @@ -90,7 +90,7 @@ npx prisma@latest orm init --yes --target postgres --authoring psl Updated tsconfig.json with required compiler options. ✔ npm add @prisma/orm-postgres dotenv ✔ npm add -D prisma@latest @types/node -✔ npm add -D @prisma/cli-engine@0.6.1 +✔ npm add -D @prisma/cli-engine@0.6.2 ✔ Emit the contract │ target: postgres │ authoring: psl @@ -398,8 +398,8 @@ check: enabled Skill Package Version Installed into prisma-8 @prisma/orm-postgres 8.0.0-rc.13 .claude/skills, .cursor/skills, .agents/skills, .devin/skills -prisma-composer-core-concepts @prisma/composer 0.23.0 .claude/skills, .cursor/skills, .agents/skills, .devin/skills -prisma-platform-core-concepts prisma 8.0.0-rc.17 .claude/skills, .cursor/skills, .agents/skills, .devin/skills +prisma-composer-core-concepts @prisma/composer 0.25.0 .claude/skills, .cursor/skills, .agents/skills, .devin/skills +prisma-platform-core-concepts prisma 8.0.0-rc.19 .claude/skills, .cursor/skills, .agents/skills, .devin/skills ⚠ [INIT.CONFIG_KEPT] prisma.config.ts already exists, so init left it alone instead of writing the skills section. → Add skills: { agents: ["claude", "cursor", "agents", "devin"] } to the object passed to definePrismaConfig in prisma.config.ts. diff --git a/apps/docs/content/docs/guides/integrations/github-actions.mdx b/apps/docs/content/docs/guides/integrations/github-actions.mdx index 69d009a864..f5c8f15dc4 100644 --- a/apps/docs/content/docs/guides/integrations/github-actions.mdx +++ b/apps/docs/content/docs/guides/integrations/github-actions.mdx @@ -126,7 +126,7 @@ npx prisma contract emit ✔ Emitted contract.json and contract.d.ts storageHash: 0c3a18eb65d5a5027c444cf0626d843cdb41dfd5fe8e66d6fce8d2eab460c971 -executionHash: 796fa270d853489edb1c3e0d332d596412292127a259b856b495a498c752882a +executionHash: 4e88564095b5e0ba7904ffdba3c563ef916d87688c8c483c67055f71a9194f0f profileHash: 3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2 ``` diff --git a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx index a2e2d5ff90..49e876c1dd 100644 --- a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx +++ b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx @@ -176,7 +176,7 @@ Choose `PSL` as the authoring style and keep the default schema path, `src/prism ```text no-copy ✔ npm add @prisma/orm-postgres dotenv ✔ npm add -D prisma@latest -✔ npm add -D @prisma/cli-engine@0.6.1 +✔ npm add -D @prisma/cli-engine@0.6.2 ✔ Emit the contract │ target: postgres │ authoring: psl diff --git a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx index c727b1f1d5..da5b6dd898 100644 --- a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx +++ b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx @@ -146,7 +146,7 @@ Choose `PSL` when asked for the contract authoring style and keep the default sc ```text no-copy ✔ npm add @prisma/orm-mongo dotenv ✔ npm add -D prisma@latest -✔ npm add -D @prisma/cli-engine@0.6.1 +✔ npm add -D @prisma/cli-engine@0.6.2 ✔ Emit the contract │ target: mongodb │ authoring: psl @@ -165,7 +165,7 @@ installed ├─ @prisma/orm-mongo ├─ dotenv ├─ prisma@latest (dev) -└─ @prisma/cli-engine@0.6.1 (dev) +└─ @prisma/cli-engine@0.6.2 (dev) ✔ Done. Open prisma-8.md to get started. ``` diff --git a/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx b/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx index 3e48f42680..d761997b80 100644 --- a/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx +++ b/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx @@ -14,7 +14,7 @@ The guide covers **PostgreSQL only**. Guidance for other databases will follow. :::info -Step 2.1 installs the `latest` version of both Prisma ORM 8 packages: `prisma`, the Prisma ORM 8 CLI, and `@prisma/orm-postgres`. This guide was written with `prisma` at `8.0.0-rc.17` and `@prisma/orm-postgres` at `8.0.0-rc.13`: the CLI is released separately, so the two numbers differ. Prisma ORM 7 stays at `7.10.0`: the example app in step 1.1 starts on it, and step 1.2 installs `@prisma/prisma7@7.10.0`. +Step 2.1 installs the `latest` version of both Prisma ORM 8 packages: `prisma`, the Prisma ORM 8 CLI, and `@prisma/orm-postgres`. This guide was written with `prisma` at `8.0.0-rc.19` and `@prisma/orm-postgres` at `8.0.0-rc.13`: the CLI is released separately, so the two numbers differ. Prisma ORM 7 stays at `7.10.0`: the example app in step 1.1 starts on it, and step 1.2 installs `@prisma/prisma7@7.10.0`. ::: @@ -228,7 +228,7 @@ After this install, `npx prisma ` runs the Prisma ORM 8 CLI and `npx pr npx prisma --version ``` -**Expected result:** the command prints `8.0.0-rc.17` or a newer version. That number does not match the version of `@prisma/orm-postgres`, because the CLI is released separately. +**Expected result:** the command prints `8.0.0-rc.19` or a newer version. That number does not match the version of `@prisma/orm-postgres`, because the CLI is released separately. ### 2.2. Create the Prisma ORM 8 config diff --git a/apps/docs/content/docs/orm/reference/sql-query-builder.mdx b/apps/docs/content/docs/orm/reference/sql-query-builder.mdx index c6cefed747..30be48a79e 100644 --- a/apps/docs/content/docs/orm/reference/sql-query-builder.mdx +++ b/apps/docs/content/docs/orm/reference/sql-query-builder.mdx @@ -385,15 +385,9 @@ Sort the result set by a column or a computed expression, in a direction you cho |---|---|---|---| | `key` | Column name (`string`) or `(f, fns) => Expression` | Yes | The column or computed value to sort by. | | `options.direction` | `'asc' \| 'desc'` | No | Sort direction. | +| `options.nulls` | `'first' \| 'last'` | No | Where rows with a null sort value go. Adds `NULLS FIRST` or `NULLS LAST` to the sort key. | -TypeScript also accepts a `nulls` option, but it does nothing, and no `NULLS FIRST` or `NULLS LAST` reaches the SQL. To put nulls last, sort by a computed value first, then by the column: - -```ts -db.sql.public.task - .select('id', 'description') - .orderBy((f, fns) => fns.raw`CASE WHEN ${f.description} IS NULL THEN 1 ELSE 0 END`.returns('pg/int4@1')) - .orderBy('description', { direction: 'asc' }); -``` +Without `options.nulls`, PostgreSQL puts nulls last for `'asc'` and first for `'desc'`. Any value other than `'first'` or `'last'` makes `orderBy()` throw an error whose `code` is `ORM.ARGUMENT_INVALID`. #### Return type @@ -410,6 +404,20 @@ const plan = db.sql.public.user.select('id', 'email').orderBy('email', { directi const rows = await runtime.query(plan); ``` +##### Put nulls last + +```ts +const plan = db.sql.public.task + .select('id', 'description') + .orderBy('description', { direction: 'desc', nulls: 'last' }) + .build(); +const rows = await runtime.query(plan); +``` + +```sql no-copy +SELECT "id" AS "id", "description" AS "description" FROM "public"."task" ORDER BY "description" DESC NULLS LAST +``` + ##### Sort by a computed value ```ts diff --git a/apps/docs/content/docs/orm/release-status.mdx b/apps/docs/content/docs/orm/release-status.mdx index feffa2ea59..f32b928204 100644 --- a/apps/docs/content/docs/orm/release-status.mdx +++ b/apps/docs/content/docs/orm/release-status.mdx @@ -37,9 +37,9 @@ For MongoDB the library is `@prisma/orm-mongo`. [Supported databases](/orm/suppo The two packages have different version numbers, and that is normal: they are released separately, and the command-line tool gets more frequent releases. Install both at `latest`; any two `latest` versions work together, and you do not pair the numbers yourself. -| Package | `latest` on 28 September 2026 | +| Package | `latest` on 29 September 2026 | | --- | --- | -| `prisma` (the command-line tool) | `8.0.0-rc.17` | +| `prisma` (the command-line tool) | `8.0.0-rc.19` | | `@prisma/orm-postgres` (the library) | `8.0.0-rc.13` | | `@prisma/orm-mongo` (the MongoDB library) | `8.0.0-rc.13` | diff --git a/apps/docs/scripts/lint-versions.ts b/apps/docs/scripts/lint-versions.ts index 8bc3a70d9e..4fa980f9c6 100644 --- a/apps/docs/scripts/lint-versions.ts +++ b/apps/docs/scripts/lint-versions.ts @@ -2,7 +2,9 @@ /** * Every pinned Prisma ORM 8 version in the current docs must be the package's - * `latest` dist-tag on npm. A version mentioned as history ("since 8.0.0-rc.10", + * `latest` dist-tag on npm. `@prisma/cli-engine` is the exception: `prisma` + * installs the exact engine version it depends on, so the expected version is + * the one in the `dependencies` of `prisma@latest`. A version mentioned as history ("since 8.0.0-rc.10", * an "Added in" column) is allowed to be older, and so is a pin to an older * major line, such as a `prisma@6.x` install step for readers staying on 6. * @@ -16,13 +18,9 @@ import { fileURLToPath } from "node:url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const DOCS_DIR = path.join(__dirname, "../content/docs"); -const TRACKED_PACKAGES = [ - "prisma", - "@prisma/orm-postgres", - "@prisma/orm-mongo", - "@prisma/cli-engine", - "@prisma/prisma7", -]; +const TRACKED_PACKAGES = ["prisma", "@prisma/orm-postgres", "@prisma/orm-mongo", "@prisma/prisma7"]; + +const PACKAGES_PINNED_BY_PRISMA = ["@prisma/cli-engine"]; /** Older releases keep their own content trees and pin their own versions. */ const VERSIONED_TREES = ["(index)/v7", "cli/v7", "guides/v7", "orm/v6", "orm/v7"]; @@ -55,12 +53,23 @@ type Violation = { expected: string; }; -async function fetchLatest(pkg: string): Promise { +type Manifest = { version: string; dependencies?: Record }; + +async function fetchLatestManifest(pkg: string): Promise { const response = await fetch(`https://registry.npmjs.org/${pkg}/latest`); if (!response.ok) { throw new Error(`npm registry returned ${response.status} for ${pkg}`); } - const { version } = (await response.json()) as { version: string }; + return (await response.json()) as Manifest; +} + +function versionPinnedByPrisma(prisma: Manifest, pkg: string): string { + const version = prisma.dependencies?.[pkg]; + if (!version || !/^\d+\.\d+\.\d+(?:-[\w.]+)?$/.test(version)) { + throw new Error( + `prisma@${prisma.version} does not depend on an exact version of ${pkg} (found ${version})`, + ); + } return version; } @@ -151,11 +160,21 @@ function lintFile(file: string, latest: Map): Violation[] { } async function main() { - const latest = new Map( - await Promise.all(TRACKED_PACKAGES.map(async (pkg) => [pkg, await fetchLatest(pkg)] as const)), + const manifests = new Map( + await Promise.all( + TRACKED_PACKAGES.map(async (pkg) => [pkg, await fetchLatestManifest(pkg)] as const), + ), ); + const latest = new Map([...manifests].map(([pkg, { version }]) => [pkg, version])); for (const [pkg, version] of latest) console.log(`${pkg}@${version}`); + const prisma = manifests.get("prisma")!; + for (const pkg of PACKAGES_PINNED_BY_PRISMA) { + const version = versionPinnedByPrisma(prisma, pkg); + latest.set(pkg, version); + console.log(`${pkg}@${version} (installed by prisma@${prisma.version})`); + } + const files = findMdxFiles(DOCS_DIR).filter((file) => !isVersionedTree(file)); const violations = files.flatMap((file) => lintFile(file, latest)); @@ -166,7 +185,7 @@ async function main() { console.error(`\n❌ ${violations.length} stale version reference(s):\n`); for (const { file, line, found, expected } of violations) { - console.error(`${file}:${line}: ${found} (latest is ${expected})`); + console.error(`${file}:${line}: ${found} (expected ${expected})`); } console.error( '\nBump the version, or mark it as history with a phrase like "since" or "before" or an "Added in" column.', From 92289115fe65f200994f8b173e38e180be864e14 Mon Sep 17 00:00:00 2001 From: willbot Date: Tue, 29 Sep 2026 13:46:15 +0200 Subject: [PATCH 2/2] docs(docs): show the CLI name in hints where the team guide had {bin} prisma 8.0.0-rc.19 installs @prisma/cli-engine 0.6.2, which prints prisma in these hints. Co-Authored-By: Claude Fable 5.1 Signed-off-by: willbot Signed-off-by: Will Madden --- .../docs/guides/database/schema-changes.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/docs/content/docs/guides/database/schema-changes.mdx b/apps/docs/content/docs/guides/database/schema-changes.mdx index 6109027312..3ba94c9cde 100644 --- a/apps/docs/content/docs/guides/database/schema-changes.mdx +++ b/apps/docs/content/docs/guides/database/schema-changes.mdx @@ -129,10 +129,10 @@ App space └─ marker 91e7f9f035806fa2789a4d726ef7724cad434fd6b00014d47ebf12d6e6bb784e ✔ Advanced ref "db" → 91e7f9f035806fa2789a4d726ef7724cad434fd6b00014d47ebf12d6e6bb784e -→ Check every space against the database: {bin} migration status +→ Check every space against the database: prisma migration status ``` -The `{bin}` in the hint is the CLI's placeholder for however you invoked it. Read it as `npx prisma migration status`. Every developer clones this repository, points `DATABASE_URL` in their `.env` at their own database, and runs `npx prisma db migrate` once to bring it to the same state. +Every developer clones this repository, points `DATABASE_URL` in their `.env` at their own database, and runs `npx prisma db migrate` once to bring it to the same state. ## 2. Incorporate team changes @@ -379,7 +379,7 @@ npx prisma migration status │↑ 20260910T1543_init ∅ → 91e7f9f 6 ops ✓ applied ○ ∅ -⚠ No migration path from the database state (91e7f9f03580) to the application's contract (1e5059c1976c). Run `{bin} migration plan --name ` to author one. +⚠ No migration path from the database state (91e7f9f03580) to the application's contract (1e5059c1976c). Run `prisma migration plan --name ` to author one. ``` Do not follow that hint literally. Without `--from`, the planner takes the `db` ref as its origin, and after `git checkout --ours` that ref is Ania's tip, so `migration plan --name merge_schema` writes only the half of the merge her branch is missing. Javier's database would still have no path to the top. Had the ref still pointed at `init`, the planner would have started a third branch from the divergence point instead, with a warning that it forks the graph. Neither is the merge. Do not delete either branch's migration directory to get out of this: Ania's and Javier's databases have already applied those migrations. Name the origin yourself, once per tip. @@ -485,7 +485,7 @@ npx prisma migration status │↑ 20260910T1543_init ∅ → 91e7f9f 6 ops ✓ applied ○ ∅ -⚠ 1 pending: run `{bin} db migrate --to 1e5059c1976c` +⚠ 1 pending: run `prisma db migrate --to 1e5059c1976c` ``` ```npm @@ -613,9 +613,9 @@ const tag = await db.orm.public.Tag.create({ tagName: "arcade", tagCategory: "ga ```text no-copy ✘ [MIGRATION.PLAN_ORIGIN_UNKNOWN] Cannot determine the plan origin: migrations exist but no origin is named why: Migrations exist on disk, but there is no `db` ref and no --from was given, so the plan origin would silently fall back to an empty database and the resulting migration would recreate everything the existing migrations already create. -→ Point the db ref at the origin contract: {bin} migration ref set db -→ Plan from an explicit origin: {bin} migration plan --from -→ Plan from an empty database deliberately: {bin} migration plan --from @empty +→ Point the db ref at the origin contract: prisma migration ref set db +→ Plan from an explicit origin: prisma migration plan --from +→ Plan from an empty database deliberately: prisma migration plan --from @empty ``` Pick the first or second. `--from @empty` over an existing history is only right for a deliberate rebuild.