{
  "id": "python/sqlalchemy-multiple-heads-in-migration",
  "signature": "alembic.util.exc.CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision.",
  "signature_zh": "alembic.util.exc.CommandError: 给定参数 'head' 存在多个头修订版本；请指定一个特定的目标修订版本。",
  "regex": "alembic\\.util\\.exc\\.CommandError:\\ Multiple\\ head\\ revisions\\ are\\ present\\ for\\ given\\ argument\\ 'head';\\ please\\ specify\\ a\\ specific\\ target\\ revision\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The Alembic migration history has diverged, resulting in multiple branch heads.",
  "root_cause_type": "generic",
  "root_cause_zh": "Alembic 迁移历史发生分歧，导致有多个分支头。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Deleting one of the migration files",
      "why_fails": "This can break the migration chain and cause database inconsistency.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Running alembic upgrade head without specifying",
      "why_fails": "Alembic cannot determine which head to upgrade to.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Merge the heads using alembic merge",
      "success_rate": 0.95,
      "how": "alembic merge heads -m \"merge heads\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "Specify the exact revision to upgrade to",
      "success_rate": 0.85,
      "how": "alembic upgrade <revision_id>",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-02-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}