prisma · Prisma Docs
Prisma execute (/docs/cli/db/execute)
How to use the Prisma CLI to run raw SQL scripts against a database using either a file path or standard input without affecting the migrations table.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Prisma execute (/docs/cli/db/execute)
How to use the Prisma CLI to run raw SQL scripts against a database using either a file path or standard input without affecting the migrations table.
When To Use
Use when you need to apply raw SQL scripts to a database or execute SQL commands via terminal standard input without triggering Prisma migration logic.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/prisma-execute-docs-cli-db-workflow-guide.md | Documentation explaining the usage and functionality of the prisma db execute CLI command for applying SQL scripts to a database. | Questions about documentation explaining the usage and functionality of the prisma db execute CLI command for applying SQL scripts to... |
examples/prisma-execute-docs-cli-db-prisma-db-execute-cli-bash-command.bash | A bash command example demonstrating the usage of the prisma db execute CLI command with various options. | Exact payloads, commands, or snippets shown in A bash command example demonstrating the usage of the prisma db execute CLI command with various options. |
examples/prisma-execute-docs-cli-db-prisma-cli-db-execute.prisma | A Prisma schema file demonstrating the configuration for the Prisma CLI db execute command. | Exact payloads, commands, or snippets shown in A Prisma schema file demonstrating the configuration for the Prisma CLI db execute command. |
examples/prisma-execute-docs-cli-db-prisma-cli-db-execute.typescript | A TypeScript code example demonstrating how to use the Prisma CLI db execute command. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use the Prisma CLI db execute command. |
examples/prisma-execute-docs-cli-db-prisma-db-execute-bash-command.bash | A bash command demonstrating how to use the npx prisma db execute CLI tool to run a SQL file. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the npx prisma db execute CLI tool to run a SQL file. |
examples/prisma-execute-docs-cli-db-prisma-db-execute-bash-command-2.bash | A bash command demonstrating how to use the Prisma CLI to execute a SQL file against a database. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the Prisma CLI to execute a SQL file against a database. |
examples/prisma-execute-docs-cli-db-prisma-db-execute-bash-command-3.bash | A bash command demonstrating how to use the prisma db execute CLI command to run a SQL file. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma db execute CLI command to run a SQL file. |
examples/prisma-execute-docs-cli-db-prisma-db-execute-bash-command-4.bash | A bash command demonstrating how to use the Prisma CLI to execute a SQL file using bunx. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the Prisma CLI to execute a SQL file using bunx. |
examples/prisma-execute-docs-cli-db-prisma-db-execute-stdin.bash | A bash command demonstrating how to pipe a SQL truncate statement into the prisma db execute command using stdin. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to pipe a SQL truncate statement into the prisma db execute command using stdin. |
What This Skill Covers
- execute (/docs/cli/db/execute)
- Main sections:
npm,pnpm,yarn,bun,Related pages.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://www.prisma.io/docs/cli/db/execute