Skip to content

Railway Deployment #19cb4f fix: normalize alembic db url scheme#86

Merged
railway-app[bot] merged 1 commit into
mainfrom
railway/fix-deploy-19cb4f
Jul 11, 2026
Merged

Railway Deployment #19cb4f fix: normalize alembic db url scheme#86
railway-app[bot] merged 1 commit into
mainfrom
railway/fix-deploy-19cb4f

Conversation

@railway-app

@railway-app railway-app Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Problem

The pre-deploy Alembic migration crashed with ModuleNotFoundError: No module named 'psycopg2'. apps/api/alembic/env.py passed the raw postgresql:// URL to engine_from_config and context.configure, which SQLAlchemy defaults to the psycopg2 dialect, but only psycopg v3 is installed.

Solution

Reused the existing _normalize_db_url helper from app.core.db to rewrite the URL to postgresql+psycopg:// before setting sqlalchemy.url and in run_migrations_offline, matching the fix already applied to the runtime engine in db.py.

Changes

  • Modified apps/api/alembic/env.py

Context

  • Deployment: #19cb4f
  • Failed commit: eead718

Generated by Railway

@railway-app
railway-app Bot merged commit 1b89678 into main Jul 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants