Исправлены ошибки в ходе раскатки

This commit is contained in:
mi
2026-07-16 14:49:04 +03:00
parent caf6bf0516
commit d86e663690
35 changed files with 482 additions and 119 deletions
+3 -2
View File
@@ -22,10 +22,11 @@ from sqlalchemy.ext.asyncio import (
AsyncEngine,
AsyncSession,
async_sessionmaker,
create_async_engine,
)
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
from app.postgres import create_postgres_engine
SCHEMA = "han_app"
@@ -347,7 +348,7 @@ class EntityExternalMapping(Base):
class Database:
def __init__(self, url: str) -> None:
self.engine: AsyncEngine = create_async_engine(url, pool_pre_ping=True)
self.engine: AsyncEngine = create_postgres_engine(url, pool_pre_ping=True)
self.sessions = async_sessionmaker(self.engine, expire_on_commit=False)
async def session(self) -> AsyncIterator[AsyncSession]: