small makeup
This commit is contained in:
parent
3a055456e6
commit
85712548d8
@ -7,7 +7,7 @@ from sqlalchemy.ext.asyncio import async_engine_from_config
|
||||
|
||||
from alembic import context
|
||||
|
||||
from src.database_adapter.model import Base
|
||||
from src.database_adapter import Base
|
||||
from src.settings import settings
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
|
3
src/database_adapter/__init__.py
Normal file
3
src/database_adapter/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from .engine import async_session_maker as async_session_maker
|
||||
from .model import Base as Base
|
||||
from .model import Log as Log
|
@ -3,4 +3,4 @@ from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
|
||||
from src.settings import settings
|
||||
|
||||
engine = create_async_engine(settings.postgres_url)
|
||||
async_session_maker_db1 = async_sessionmaker(engine, expire_on_commit=False)
|
||||
async_session_maker = async_sessionmaker(engine, expire_on_commit=False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user