Skip to main content

prisma-cli-migrate-resolve

prisma migrate resolve

설치로 이동

소스 정보

저장소
prisma/cursor-plugin
최근 소스 활동
2026년 2월 6일 14:17
감지된 SKILL.md 언어
영어
스타
10
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
prisma-cli-migrate-resolve
description
prisma migrate resolve
license
MIT
metadata
{"author":"prisma","version":"7.0.0"}
# prisma migrate resolve Resolves issues with database migrations, such as failed migrations or baselining. ## Command ```bash prisma migrate resolve [options] ``` ## What It Does Updates the `_prisma_migrations` table to manually change the state of a migration. This is a recovery tool. ## Options You must provide exactly one of `--applied` or `--rolled-back`. | Option | Description | |--------|-------------| | `--applied <name>` | Mark a migration as **applied** (success) | | `--rolled-back <name>` | Mark a migration as **rolled back** (ignored/failed) | | `--schema` | Path to schema file | | `--config` | Custom path to your Prisma config file | ## Examples ### Mark as Applied (Baselining) If you have existing tables and want to initialize migrations without running the SQL: ```bash prisma migrate resolve --applied 20240101000000_initial_migration ``` This tells Prisma "Assume this migration has already run". ### Mark as Rolled Back (Fixing Failures) If a migration failed (e.g., syntax error) and you fixed the SQL or want to retry: ```bash prisma migrate resolve --rolled-back 20240115120000_failed_migration ``` This tells Prisma "Forget this migration run, let me try applying it again". ## Use Cases 1. **Baselining**: Adopting Prisma Migrate on an existing production database. 2. **Failed Migrations**: Recovering from a failed `migrate deploy` in production. 3. **Hotfixes**: reconciling manual database changes (rare). ## References - [Baselining](https://www.prisma.io/docs/guides/database/developing-with-prisma-migrate/baselining) - [Troubleshooting](https://www.prisma.io/docs/guides/database/production-troubleshooting)
GitHub에서 보기