prisma-cli-migrate-reset
작성자: prisma
prisma 마이그레이션 리셋
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-cli-migrate-resetprisma migrate reset
Resets your database and re-applies all migrations.
Command
prisma migrate reset [options]
What It Does
- Drops the database (if possible) or deletes all data/tables
- Re-creates the database
- Applies all migrations from
prisma/migrations/ - Runs the seed script (if configured)
Warning: All data will be lost.
Options
| Option | Description |
|---|---|
--force / -f | Skip confirmation prompt |
--schema | Path to schema file |
--config | Custom path to your Prisma config file |
Examples
Basic reset
prisma migrate reset
Prompts for confirmation in interactive terminals.
Force reset (CI/Automation)
prisma migrate reset --force
With custom schema
prisma migrate reset --schema=./custom/schema.prisma
When to Use
- Development: When you want a fresh start
- Testing: Resetting test database before suites
- Drift Recovery: When the database is out of sync and you can't migrate
Behavior in v7
- In v6,
migrate resetautomatically ranprisma generate. - In v7, you may need to run
prisma generateseparately if you want to update the client, thoughresetfocuses on the database state. - Seed script IS run by default after reset.
Configuration
Configure seed script in prisma.config.ts to run it automatically after reset:
export default defineConfig({
migrations: {
seed: 'tsx prisma/seed.ts',
},
})
prisma의 다른 스킬
prisma-cli-migrate-status
prisma
prisma 마이그레이션 상태
official
prisma-cli-studio
prisma
prisma studio. 이 Prisma 기능을 사용할 때 참고하세요.
official
prisma-cli-validate
prisma
prisma 검증. 이 Prisma 기능을 사용할 때 참조하세요.
official
prisma-cli-db-execute
prisma
prisma db execute. 이 Prisma 기능을 사용할 때 참고하세요.
official
prisma-cli-db-pull
prisma
prisma-cli-db-pull — AI 에이전트용 설치 가능한 스킬, prisma/cursor-plugin에서 게시함.
official
prisma-cli-db-push
prisma
prisma db push. 이 Prisma 기능을 사용할 때 참고하세요.
official
prisma-cli-db-seed
prisma
prisma db seed. 이 Prisma 기능을 사용할 때 참고하세요.
official
prisma-cli-debug
prisma
Prisma 디버그. 이 Prisma 기능을 사용할 때 참조하세요.
official