# django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency myapp.0001_initial on database 'default'.

- **ID:** `python/django-migration-merge-conflict`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Migration dependencies are out of order, often due to merging branches incorrectly.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

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

## Dead Ends

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