Pre-flight checks before running `prisma migrate deploy` in the users service.
Scanned 9/22/2026
Install to Claude Code
npx -y skills add mattbutlerengineering/mattbutlerengineering --skill prisma-migrate-safety --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Prisma Migrate Safety?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/mattbutlerengineering-prisma-migrate-safety)More formats (shields.io, HTML) on the badges page.
# Skill: prisma-migrate-safety
Pre-flight checks before running `prisma migrate deploy` in the users service.
## Workflow
### Step 1: Staging Validation
```bash
# Validate migration against staging DB first
DATABASE_URL=$STAGING_DATABASE_URL npx prisma migrate deploy --preview
```
### Step 2: Migration Checks
```bash
# Check migration integrity
npx prisma migrate status
# Verify no destructive changes without marker
grep -r "DROP TABLE\|DROP COLUMN" prisma/migrations/*/migration.sql | grep -v "^-- DESTRUCTIVE:"
```
### Step 3: Deploy with Rollback Plan
```bash
# Tag current state before deploying
git tag "users-pre-migrate-$(date +%Y%m%d-%H%M%S)"
git push origin --tags
# Deploy
pnpm --dir services/users db:migrate:deploy
```
## Rollback Procedure
```bash
# If migration fails, revert to pre-migration tag
git checkout users-pre-migrate-<tag>
pnpm --dir services/users db:migrate:deploy
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!