# Django迁移历史不一致：迁移admin.0001_initial在其依赖myapp.0001_initial之前应用于数据库'default'。

- **ID:** `python/django-migration-merge-conflict`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

迁移依赖顺序错误，通常是由于合并分支不正确。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (85% 成功率)
   ```
   Use 'python manage.py makemigrations --merge' to resolve conflicts.
   ```

## 无效尝试

- **** — Can hide real inconsistencies and cause data loss. (70% 失败率)
- **** — Loses migration history and may break existing databases. (60% 失败率)
