Skip to content

Commit 3941248

Browse files
committed
Make profile picture url mandatory in the DB and user schema
1 parent c0d58e2 commit 3941248

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/models/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class User(Base):
1919
email: Mapped[str] = mapped_column(String(50), unique=True, index=True)
2020
hashed_password: Mapped[str] = mapped_column(String)
2121

22-
profile_image_url: Mapped[str] = mapped_column(String, default="https://profileimageurl.com")
22+
profile_image_url: Mapped[str] = mapped_column(String)
2323
uuid: Mapped[uuid_pkg.UUID] = mapped_column(UUID(as_uuid=True), default_factory=uuid7, unique=True)
2424
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default_factory=lambda: datetime.now(UTC))
2525
updated_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), default=None)

src/app/schemas/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class UserBase(BaseModel):
1010
name: Annotated[str, Field(min_length=2, max_length=30, examples=["User Userson"])]
1111
username: Annotated[str, Field(min_length=2, max_length=20, pattern=r"^[a-z0-9]+$", examples=["userson"])]
1212
email: Annotated[EmailStr, Field(examples=["[email protected]"])]
13+
profile_image_url: Annotated[str, Field(examples=["https://www.profileimageurl.com"])]
1314

1415

1516
class User(TimestampSchema, UserBase, UUIDSchema, PersistentDeletion):
16-
profile_image_url: Annotated[str, Field(default="https://www.profileimageurl.com")]
1717
hashed_password: str
1818
is_superuser: bool = False
1919
tier_id: int | None = None

0 commit comments

Comments
 (0)