{
  "id": "python/django-missing-migrations-dir",
  "signature": "django.core.exceptions.ImproperlyConfigured: Error importing migration module django.contrib.admin.migrations: No module named 'django.contrib.admin.migrations'",
  "signature_zh": "配置错误：导入迁移模块 django.contrib.admin.migrations 失败：找不到模块 'django.contrib.admin.migrations'",
  "regex": "django\\.core\\.exceptions\\.ImproperlyConfigured:\\ Error\\ importing\\ migration\\ module\\ django\\.contrib\\.admin\\.migrations:\\ No\\ module\\ named\\ 'django\\.contrib\\.admin\\.migrations'",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "The migrations package directory is missing or corrupted, often due to incomplete installation or manual deletion.",
  "root_cause_type": "generic",
  "root_cause_zh": "迁移包目录缺失或损坏，通常由于安装不完整或手动删除导致。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Running migrate again won't recreate missing migration files; it only applies existing migrations.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Deleting and recreating the migrations folder manually can cause inconsistency with the database migration history.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.7,
      "how": "Reinstall Django: pip install --force-reinstall Django==3.2.0",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Create empty __init__.py in each app's migrations directory, then run makemigrations --empty appname",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}