Update app/db.py
Browse files
app/db.py
CHANGED
@@ -74,8 +74,17 @@ from fastapi_users.db import SQLAlchemyBaseUserTableUUID, SQLAlchemyUserDatabase
|
|
74 |
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
75 |
from sqlalchemy.orm import DeclarativeBase
|
76 |
|
77 |
-
DATABASE_URL = "sqlite+aiosqlite:///./test.db"
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
class Base(DeclarativeBase):
|
81 |
pass
|
|
|
74 |
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
75 |
from sqlalchemy.orm import DeclarativeBase
|
76 |
|
77 |
+
#DATABASE_URL = "sqlite+aiosqlite:///./test.db"
|
78 |
|
79 |
+
db_url = URL.create(
|
80 |
+
"postgresql+asyncpg",
|
81 |
+
username="avnadmin",
|
82 |
+
password="AVNS_u12fHxoNLBbzD8TGpqN", # plain (unescaped) text
|
83 |
+
host="pg-opengenai-opengenai.b.aivencloud.com",
|
84 |
+
database="defaultdb",
|
85 |
+
port=14535,
|
86 |
+
)
|
87 |
+
DATABASE_URL = db_url
|
88 |
|
89 |
class Base(DeclarativeBase):
|
90 |
pass
|