From 6c46a1df3a060e3dac1f00245aa299fdc9a12d5e Mon Sep 17 00:00:00 2001 From: Campbell Alden Date: Thu, 3 Sep 2026 23:00:07 +0900 Subject: [PATCH] Add a default False to the user model email_confirmed field to avoid violation errors if the value is not explicitly set --- src/infra/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infra/users.py b/src/infra/users.py index a01e4bc..cf4170b 100644 --- a/src/infra/users.py +++ b/src/infra/users.py @@ -18,7 +18,7 @@ class UserModel(Base): __tablename__ = 'user' id: Mapped[int] = mapped_column(primary_key=True) email: Mapped[str] = mapped_column(String(254), unique=True) - email_confirmed: Mapped[bool] = mapped_column() + email_confirmed: Mapped[bool] = mapped_column(default=False) password_hash: Mapped[str] = mapped_column(VARCHAR(255)) subscriptions: Mapped[list['SubscriptionModel']] = relationship(back_populates='user')