Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/prisma-execute-docs-cli-db-workflow-guide.mdDocumentation 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.bashA 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.prismaA 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.typescriptA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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