{"record":{"id":"740da2eeb8760a3c","repo":"BerriAI/litellm","slug":"prisma-db-push-failed-detail-e","errorCode":null,"errorMessage":"prisma db push failed.\n\nDetail: {e}","messagePattern":"prisma db push failed\\.\n\nDetail: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"litellm-proxy-extras/litellm_proxy_extras/utils.py","lineNumber":548,"sourceCode":"        if not use_migrate:\n            # Preserve `prisma db push` path unchanged.\n            original_dir = os.getcwd()\n            os.chdir(migrations_dir)\n            try:\n                subprocess.run(\n                    [_get_prisma_command(), \"db\", \"push\", \"--accept-data-loss\"],\n                    timeout=prisma_command_timeout(),\n                    check=True,\n                    env=_get_prisma_env(),\n                )\n                return True\n            except (\n                subprocess.CalledProcessError,\n                subprocess.TimeoutExpired,\n            ) as e:\n                # Re-raise as RuntimeError so proxy_cli.py's\n                # `except RuntimeError` catches it and exits cleanly.\n                raise RuntimeError(f\"prisma db push failed.\\n\\nDetail: {e}\") from e\n            finally:\n                os.chdir(original_dir)\n\n        # Informational — never blocks.\n        ProxyExtrasDBManager._warn_if_db_ahead_of_head(migrations_dir)\n\n        original_dir = os.getcwd()\n        os.chdir(migrations_dir)\n        try:\n            for attempt in range(4):\n                try:\n                    result = subprocess.run(\n                        [_get_prisma_command(), \"migrate\", \"deploy\"],\n                        timeout=prisma_command_timeout(),\n                        check=True,\n                        capture_output=True,\n                        text=True,\n                        env=_get_prisma_env(),","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm-proxy-extras/litellm_proxy_extras/utils.py#L530-L566","documentation":"RuntimeError raised when 'prisma db push' fails or times out on the legacy (use_migrate=False) schema-sync path; the underlying CalledProcessError/TimeoutExpired detail is embedded. Indicates the schema could not be pushed to the database.","triggerScenarios":"Thrown at litellm-proxy-extras/litellm_proxy_extras/utils.py:548 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the Prisma Detail output: fix schema drift, database connectivity, or DATABASE_URL, then rerun prisma db push.","Ensure the database user has DDL privileges."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}