# alembic.util.exc.CommandError: Multiple head revisions are present for given argument chain; please specify a specific target revision.

- **ID:** `python/sqlalchemy-multiple-heads-migration`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

数据库迁移脚本中出现了多个分支头，Alembic 无法自动选择升级路径。

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   使用 alembic merge -m 'merge heads' 合并多个头，生成一个合并迁移。
   ```
2. **** (70% success)
   ```
   指定具体的升级目标，例如：alembic upgrade <revision>
   ```

## Dead Ends

- **** — 手动删除某个迁移文件，但会导致版本历史不完整，其他开发者的环境无法同步。 (60% fail)
- **** — 尝试直接修改 alembic_version 表，但可能造成与迁移脚本不一致。 (80% fail)
