Phase 2 Complete: SQL migration with SQLModel and Alembic
This commit is contained in:
+4
-1
@@ -28,7 +28,7 @@ class UserTable(UserBase, table=True):
|
||||
created_at: datetime = Field(default_factory=datetime.now)
|
||||
last_login: Optional[datetime] = None
|
||||
|
||||
# Relationships
|
||||
# Relationships - Using string reference to avoid circular import errors
|
||||
watchlist_items: List["WatchlistItemTable"] = Relationship(back_populates="user")
|
||||
|
||||
|
||||
@@ -60,3 +60,6 @@ class Token(BaseModel):
|
||||
class UserInDB(User):
|
||||
"""Schema for user stored in database (with hashed password)"""
|
||||
hashed_password: str
|
||||
|
||||
# Import WatchlistItemTable here to resolve SQLModel Relationship mappings
|
||||
from .watchlist import WatchlistItemTable
|
||||
|
||||
Reference in New Issue
Block a user