forked from polka_billy/porridger
trying to make api work - 1
This commit is contained in:
@ -4,12 +4,13 @@ from sqlalchemy.orm import sessionmaker
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
|
||||
SQLALCHEMY_DATABASE_URL = "sqlite+aiosqlite:///./sql_app.db"
|
||||
SQLALCHEMY_DATABASE_URL = "postgresql+asyncpg://postgres:D560c34V112Ak@localhost/porridger"
|
||||
engine = create_async_engine(SQLALCHEMY_DATABASE_URL, echo=True)
|
||||
|
||||
SessionLocal = sessionmaker(bind=engine, class_=AsyncSession, expire_on_commit=False)
|
||||
|
||||
async_session = async_scoped_session(SessionLocal, scopefunc=current_task)
|
||||
async_session = SessionLocal()
|
||||
# async_session = async_scoped_session(SessionLocal, scopefunc=current_task)
|
||||
Base = declarative_base()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user