1.1 KiB
1.1 KiB
AI safety checkpoint for destructive commands
Prisma detects common AI-agent environments and blocks these commands until the user gives explicit consent:
prisma migrate resetprisma db push --force-resetprisma db push --accept-data-loss
Required workflow
- Inspect the target database/config and explain exactly what can be deleted or reset.
- Ask the user for explicit consent immediately before the action.
- Run the command only after that consent.
For an agent-run subprocess, Prisma accepts the exact consent text through:
PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION='<exact user consent message>' prisma migrate reset --force
The value must match the user's message exactly and must not contain added quotes or newlines. Never fabricate consent, reuse an old unrelated approval, or bypass the checkpoint by hiding agent-detection environment variables.
The MCP server has no migrate-reset tool. Use the shell command only after consent.