Skip to content

Commit

Permalink
🐛 fixed dsn type compatible with docker env
Browse files Browse the repository at this point in the history
  • Loading branch information
agn-7 committed Dec 21, 2023
1 parent a6fe65f commit 6c3c6b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_migrations_offline() -> None:
"""

context.configure(
url=settings.SQLALCHEMY_DATABASE_URI.unicode_string(),
url=f"{settings.SQLALCHEMY_DATABASE_URI}",
target_metadata=target_metadata,
literal_binds=True,
compare_types=True,
Expand All @@ -61,7 +61,7 @@ def run_migrations_online() -> None:
configuration = config.get_section(config.config_ini_section)
configuration[
"sqlalchemy.url"
] = settings.SQLALCHEMY_DATABASE_URI.unicode_string().replace("+asyncpg", "")
] = f"{settings.SQLALCHEMY_DATABASE_URI}".replace("+asyncpg", "")
connectable = engine_from_config(
configuration,
prefix="sqlalchemy.",
Expand Down
2 changes: 1 addition & 1 deletion ifsguid/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .config import settings

engine: AsyncEngine = create_async_engine(
settings.SQLALCHEMY_DATABASE_URI.unicode_string()
f"{settings.SQLALCHEMY_DATABASE_URI}"
)
async_session = sessionmaker(
autocommit=False,
Expand Down

0 comments on commit 6c3c6b3

Please sign in to comment.