File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99from sqlalchemy import ForeignKey
1010from fastapi import Depends
1111
12- DATABASE_URL = "sqlite+aiosqlite:///./test.db?timeout=10"
13-
12+ DATABASE_URL = os .getenv ("DATABASE_URL" , "sqlite+aiosqlite:///./test.db?timeout=10" )
1413
1514
1615class Base (DeclarativeBase ):
@@ -27,6 +26,7 @@ class Post(Base):
2726 url = Column (String , nullable = False )
2827 file_type = Column (String , nullable = False )
2928 file_name = Column (String , nullable = False )
29+ file_id = Column (String , nullable = False )
3030 created_at = Column (DateTime , default = datetime .datetime .utcnow )
3131 user_id = Column (Uuid , ForeignKey ("user.id" ),nullable = False )
3232 user = relationship ("User" , back_populates = "posts" )
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ python-dotenv>=1.2.1
66uvicorn [standard ]>= 0.40.0
77streamlit
88requests
9+ asyncpg
You can’t perform that action at this time.
0 commit comments