Migrate
Runs pending Prisma migrations for TenantFlow.
Usage
/migrate— run pending migrations against development DB/migrate --staging— run against staging database/migrate --prod— run against production (confirms before proceeding)
Workflow
- Show pending migrations —
npx prisma migrate status - Review — list the pending migration files and summarize what they change
- Confirm with user before running against staging or production
- Run —
npx prisma migrate deploy - Verify — confirm migration completed successfully; show any warnings
- If production: run a quick sanity check query to verify tenant data integrity
Project specifics
- ORM: Prisma
- Migration directory:
prisma/migrations/ - Schema file:
prisma/schema.prisma - Dev DB:
DATABASE_URLin.env - Always verify tenant isolation columns exist on new tables