02: Changed setup for alembic and sqlAlchemy

This commit is contained in:
exolonConfidental
2026-02-06 22:22:59 +05:30
parent 61162e01fb
commit 8fb3b7cf67
14 changed files with 739 additions and 25 deletions

13
app/db/database.py Normal file
View File

@@ -0,0 +1,13 @@
from sqlalchemy.ext.asyncio import create_async_engine
from dotenv import load_dotenv
import os
load_dotenv()
DATABASE_URL = os.getenv("DATABASE_URL")
engine = create_async_engine(
DATABASE_URL,
echo=True,
future= True
)