mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Fix mongo connection
This commit is contained in:
parent
9abe5dd519
commit
52b452c85a
16 changed files with 53 additions and 38 deletions
|
|
@ -4,7 +4,7 @@ from logging.config import fileConfig
|
|||
from sqlalchemy.ext.asyncio import AsyncEngine
|
||||
|
||||
from alembic import context
|
||||
from database.engine import engine
|
||||
from database.engine import postgres_engine
|
||||
from database.models import Base
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
|
|
@ -40,7 +40,7 @@ def run_migrations_online() -> None:
|
|||
and associate a connection with the context.
|
||||
|
||||
"""
|
||||
connectable = context.config.attributes.get("connection", None) or engine
|
||||
connectable = context.config.attributes.get("connection", None) or postgres_engine
|
||||
|
||||
if isinstance(connectable, AsyncEngine):
|
||||
asyncio.run(run_async_migrations(connectable))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue