prisma/skills

prisma-postgres-upgrade

Upgrade a PostgreSQL app from Prisma ORM 6 or 7 straight to Prisma 8 in one pass, keeping the existing schema.prisma, database and data.

  • SKILL.md 已保存
  • 英文来源资料
  • 安装与运行未实测
先判断是否解决你的问题

prisma-postgres-upgrade 是什么?

Upgrade a PostgreSQL app from Prisma ORM 6 or 7 straight to Prisma 8 in one pass, keeping the existing schema.prisma, database and data. Use when a Postgres project on Prisma 6 or 7 wants Prisma 8, including before deploying it on Prisma Compute, which runs only Prisma 8. Triggers on "upgrade prisma 6 to 8", "upgrade prisma 7 to 8", "upgrade to prisma 8 postgres", "prisma7Schema", "migrations/app", "move off @prisma/client", "Console says move to Prisma 8".

以上为来源原文,中文用途说明尚待整理。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 prisma-postgres-upgrade,然后告诉 Agent 你的任务和实际输入,让它先核对触发条件。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 prisma-postgres-upgrade

请在 Codex 的当前工作环境中安装并检查 prisma-postgres-upgrade 这个 Skill。

项目身份:prisma/skills / prisma-postgres-upgrade
来源:https://github.com/prisma/skills/blob/a6f192959cf43b08aa330fe1ffca090267215812/prisma-postgres-upgrade/SKILL.md
已定位的源文件:prisma-postgres-upgrade/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-20T19:31:09.802Z
中文使用说明
尚待整理,保留英文来源内容
安装与任务测试
本站未执行安装或任务测试
来源复核
已保留来源记录;当前完整用法未逐项人工复核
展开 SKILL.md 原文、章节与历史收录资料

prisma-postgres-upgrade/SKILL.md · 抓取时间 2026-11-20T19:31:09.802Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Upgrade a PostgreSQL app from Prisma ORM 6 or 7 straight to Prisma 8 in one pass, keeping the existing schema.prisma, database and data. Use when a Postgres project on Prisma 6 or 7 wants Prisma 8, including before deploying it on Prisma Compute, which runs only Prisma 8. Triggers on "upgrade prisma 6 to 8", "upgrade prisma 7 to 8", "upgrade to prisma 8 postgres", "prisma7Schema", "migrations/app", "move off @prisma/client", "Console says move to Prisma 8".

查看源文件章节 / Source sections
  • 原文:Prisma Postgres Upgrade: Prisma ORM 6 or 7 to Prisma 8
  • 原文:When to Apply
  • 原文:Versions
  • 原文:The path
  • 原文:Deploying on Compute
  • 原文:What the user does
  • 原文:Reference files
  • 原文:Verified against
  • 原文:Hand-off rule
原文:Prisma Postgres Upgrade: Prisma ORM 6 or 7 to Prisma 8

Move a Node.js server on Prisma ORM 6 or 7 and PostgreSQL to Prisma 8 in one pass. The schema, the database and its data stay, and the app keeps running wherever it runs today. This skill is the bridge. It covers only what is specific to leaving Prisma ORM 6 or 7. Prisma 8 itself (the contract, migrations, queries, errors) is covered by the `prisma-8` skill that ships inside `@prisma/orm-postgres`, which step 2 installs. Follow it for anything Prisma 8 specific; it matches the installed version, and this skill does not. `prisma-8` says it does not apply to a project that still has `schema.prisma` and `@prisma/client`. That is expected mid-upgrade: this skill keeps both until step 5, and `prisma7Schema(...)` reads that `schema.prisma`. Use `prisma-8` for the Prisma 8 side anyway. The [Prisma ORM 6 or 7 to 8 (PostgreSQL) guide](https://www.prisma.io/docs/guides/upgrade-prisma-orm/postgresql) is the source of truth for the steps. **Never do either of these:** - Never route a PostgreSQL Prisma ORM 6 app through Prisma ORM 7 first. Prisma 8 reads a Prisma ORM 6 `schema.prisma` unchanged, so `prisma-upgrade-v7` is only for apps that stay on 7. - Never install `prisma@latest` or `@prisma/orm-postgres@latest` when the app will deploy on Prisma Compute: the latest pair does not work with the Composer version the Console's setup installs, so the deploy fails.

原文:When to Apply

- A PostgreSQL project on Prisma ORM 6 or 7 asks to upgrade to Prisma 8 in one pass - A Prisma ORM 6 or 7 app wants to deploy on Prisma Compute, or the Console blocked its setup with "move to Prisma 8": upgrade here, then deploy with `prisma-compute` Not for: deploying on Compute (use `prisma-compute`, `deploy-existing-app`), MongoDB (use `prisma-mongodb-upgrade`), a Prisma ORM 7 app moving one route at a time beside Prisma 8 (follow the [route-by-route guide](https://www.prisma.io/docs/guides/upgrade-prisma-orm/postgresql-incremental)), a project already on Prisma 8 (use the synced `prisma-8` skill), or a new project (use `prisma-orm-setup`).

原文:Versions

Install exact versions with `--save-exact`. For an app headed to Compute, use the versions the Console's setup uses: today `prisma` `8.0.0-rc.27` (dev dependency) and `@prisma/orm-postgres` `8.0.0-rc.20`. If the Console's message or an existing setup pull request names other versions, use those. Use Node.js 24.11 or newer if the app will run under `prisma dev`.

原文:The path

| Step | What happens | Where the detail is | |------|--------------|---------------------| | 0 | Run the repo's own checks and record the results | `verify-upgrade-checklist` | | 1 | Remove `prisma`, install the versions above, remove `prisma generate` from scripts | this file | | 2 | Write the Prisma 8 `prisma.config.ts`, then `npx prisma skills sync` | `adopt-schema-and-migrations` | | 3 | `contract emit`, `db sign`, baseline migration, retire `prisma/migrations` | `adopt-schema-and-migrations` | | 4 | Create the Prisma 8 client and rewrite every query | `client-api-mapping` | | 5 | Remove `@prisma/client`, the adapter and the generated client | this file | | 6 | Run the same checks again and start the app | `verify-upgrade-checklist` | In step 1, also remove `prisma generate` from `build`, `postinstall` and any other script: the Prisma 8 CLI has no `generate` and fails with `CLI.UNKNOWN_COMMAND`. Step 1 removes the only command that generated the old client. It keeps working locally, but a fresh install (CI, a new clone) has none, so finish step 4 before pushing to a branch CI builds. The sync in step 2 installs `prisma-8`, `prisma-platform-core-concepts` and `prisma-composer-core-concepts` in one go, because the CLI depends on Composer. It writes them for every agent it knows unless `skills.agents` in the config lists only the ones the repository uses. In a Prisma ORM 7 app, replace the old `prisma.config.ts` before syncing: the sync fails with `CLI.CONFIG_UNREADABLE` while the old one is in place. Commit what Prisma 8 writes: `src/prisma/contract.json`, `src/prisma/contract.d.ts` and the whole `migrations/` folder. There is no generate step to recreate them in CI. In step 5, `npm uninstall @prisma/client` leaves the generated client behind; delete `node_modules/.prisma` too, then run a fresh install and the checks so nothing still imports it.

原文:Deploying on Compute

When the upgrade is done and the checks pass, deploy with the `prisma-compute` skill (`references/deploy-existing-app.md`). Compute runs only Prisma 8, so the upgrade has to be finished first.

原文:What the user does

The agent cannot do these; stop and ask: - Decide what to do about a database time zone other than UTC (see `client-api-mapping`). - Sign every other existing database (staging, production) with `npx prisma db sign`. The agent has only the local one. - Review the change before it ships, especially when the repository has no tests.

文件 SHA256:4ecb78c25e7fd42663b81f9b6c7ce0b194c096d58a3f1880c08d8094db621d5b

仓库许可证记录:MIT;skill-declaration-captured-not-interpreted,查看来源。

SKILL.md原文description · 2026-11-20T19:31:09.802Z

Upgrade a PostgreSQL app from Prisma ORM 6 or 7 straight to Prisma 8 in one pass, keeping the existing schema.prisma, database and data. Use when a Postgres project on Prisma 6 or 7 wants Prisma 8, including before deploying it on Prisma Compute, which runs only Prisma 8. Triggers on "upgrade prisma 6 to 8", "upgrade prisma 7 to 8", "upgrade to prisma 8 postgres", "prisma7Schema", "migrations/app", "move off @prisma/client", "Console says move to Prisma 8".

查看历史简介来源

历史收录数据

来源仓库prisma/skills
Skill源路径prisma-postgres-upgrade/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源