| name | drizzle-migration-conflict |
| description | Classifies and repairs Drizzle Kit clashes in _journal.json, snapshots, and generated SQL after pull, merge, or rebase, including non-commutative drizzle-kit check failures. Use when migration artifacts conflict or a team needs regenerate-from-merged-schema plus CI policy. Do not use for schema modeling, drizzle-kit push as the production fix, or migrate against an unconfirmed database. |
| version | 1.0.1 |
| category | databases |
| risk | critical |
| source | community |
| source_repo | chaunsin/agent-skills |
| source_type | community |
| date_added | 2026-06-29 |
| tags | ["drizzle","migrations","database","ci","merge-conflicts"] |
| tools | ["git","python","rg"] |
| license | Apache-2.0 |
| license_source | https://github.com/chaunsin/agent-skills/blob/master/LICENSE |
Drizzle Migration Conflict
Diagnose, repair, and prevent Drizzle Kit migration conflicts in a multi-developer repository. Drizzle migrations encode both SQL and migration snapshots, so the safe answer depends on the current migration directory shape, the Drizzle Kit version, and the git state.
When to Use
- Drizzle migration files,
_journal.json, or snapshot.json conflict after a pull, merge, rebase, or PR update.
drizzle-kit check reports non-commutative migrations or migration folder conflicts.
- A team wants a safe repair flow for generated Drizzle migrations after schema changes converge.
- Designing CI or merge-queue policy to prevent repeated Drizzle migration conflicts.
- Transitioning from legacy flat layout to folder-based migrations and encountering conflicts mid-transition.
Prerequisites
- Git repository with Drizzle Kit migrations (
drizzle-kit and drizzle-orm installed).
- Python 3 available if using the helper script (read-only, no DB connection).
rg (ripgrep) for file discovery.
- Windows host primary (PowerShell). Adjust path separators and quoting for PowerShell vs. bash when running commands.
Procedure
Step 1 — Classify the mode
Determine the task mode before taking any action:
- Diagnose — The user has a conflict or failed
drizzle-kit check and wants to understand it. Read-only only.
- Repair — The user explicitly asks to fix or regenerate migration files. Adds file writes and
drizzle-kit generate/check execution, each gated by safety rules and explicit confirmation.
- CI hardening — The user wants to prevent future conflicts in PRs or merge queues. Adds proposing or editing CI/workflow files. Do not run migration commands against the user's database.
- Explain — The user wants a conceptual answer or a team playbook. No commands beyond optional read-only inspection.
When the mode is not explicit, choose Diagnose.
Mode boundaries — do not cross without an explicit upgrade:
| Mode | Allowed actions |
|---|
| Diagnose | git status, git ls-files -u, helper script, file inspection. No , typechecks, tests, or writes. |