Skip to content

Commit 8450f0b

Browse files
committed
FIX: Correctly read DATABASE_URL in alembic env
1 parent 8cd3020 commit 8450f0b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

alembic/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
load_dotenv()
1010
config = context.config
11-
DATABASE_URL = os.getenv("AMMENTOR_DB_URL")
11+
DATABASE_URL = os.getenv("DATABASE_URL")
1212
config.set_main_option("sqlalchemy.url", DATABASE_URL)
1313

1414
from app.db.db import Base

app/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
load_dotenv()
55

66
class Settings:
7-
DATABASE_URL: str = os.getenv("AMMENTOR_DB_URL", "")
7+
DATABASE_URL: str = os.getenv("DATABASE_URL", "")
88
ENV: str = os.getenv("ENV", "development")
99

1010
settings = Settings()

app/db/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
load_dotenv()
88

9-
DATABASE_URL = os.getenv("AMMENTOR_DB_URL")
9+
DATABASE_URL = os.getenv("DATABASE_URL")
1010

1111

1212
engine = create_engine(DATABASE_URL, pool_pre_ping=True)

0 commit comments

Comments
 (0)