Skip to content

Commit fb74b9a

Browse files
committed
fix: alembic init setting
1 parent d99dfb9 commit fb74b9a

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

backend/alembic/env.py

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

1111
config = context.config
1212
url = os.getenv("DATABASE_URL")
13-
if url.startswith("postgresql+asyncpg"):
13+
if url and url.startswith("postgresql+asyncpg"):
1414
url = url.replace("postgresql+asyncpg", "postgresql")
1515

1616
config.set_main_option("sqlalchemy.url", url)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"""Initial
2+
3+
Revision ID: 806bfed178bd
4+
Revises: 7bfcd3825096
5+
Create Date: 2025-04-06 11:25:58.040012
6+
7+
"""
8+
from typing import Sequence, Union
9+
10+
from alembic import op
11+
import sqlalchemy as sa
12+
13+
14+
# revision identifiers, used by Alembic.
15+
revision: str = '806bfed178bd'
16+
down_revision: Union[str, None] = '7bfcd3825096'
17+
branch_labels: Union[str, Sequence[str], None] = None
18+
depends_on: Union[str, Sequence[str], None] = None
19+
20+
21+
def upgrade() -> None:
22+
"""Upgrade schema."""
23+
# ### commands auto generated by Alembic - please adjust! ###
24+
pass
25+
# ### end Alembic commands ###
26+
27+
28+
def downgrade() -> None:
29+
"""Downgrade schema."""
30+
# ### commands auto generated by Alembic - please adjust! ###
31+
pass
32+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)