{
  "id": "python/django-migration-unapplied-error",
  "signature": "django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is read-only)",
  "signature_zh": "django.db.migrations.exceptions.MigrationSchemaMissing: 无法创建django_migrations表（数据库为只读）",
  "regex": "django\\.db\\.migrations\\.exceptions\\.MigrationSchemaMissing:\\ Unable\\ to\\ create\\ the\\ django_migrations\\ table\\ \\(database\\ is\\ read\\-only\\)",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Database user lacks permission to create tables, or database is in read-only mode.",
  "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": "Does not solve permission issues; may still fail.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Data loss; not a viable solution in production.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Grant necessary permissions to the database user: GRANT ALL ON database.* TO 'user'@'localhost'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Check database connection settings and ensure the user has write access.",
      "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": "2024-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}