# django.db.migrations.exceptions.IrreversibleError: Migration 0002_auto cannot be reversed

- **ID:** `python/django-migration-irreversible`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A migration contains operations that are not reversible, such as RunSQL without reverse code.

## Version Compatibility

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

## Workarounds

1. **Add reverse code to RunSQL operations** (90% success)
   ```
   migrations.RunSQL(sql, reverse_sql='DROP TABLE ...')
   ```
2. **Create a new migration to revert changes** (85% success)
   ```
   Generate a new migration that reverses the effects.
   ```

## Dead Ends

- **Forcing reverse migration with --fake** — May leave database in inconsistent state. (80% fail)
- **Deleting migration files** — Breaks migration chain; may cause future errors. (70% fail)
