Add a default False to the user model email_confirmed field to avoid violation errors if the value is not explicitly set
This commit is contained in:
parent
32e3fe04a2
commit
6c46a1df3a
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ class UserModel(Base):
|
||||||
__tablename__ = 'user'
|
__tablename__ = 'user'
|
||||||
id: Mapped[int] = mapped_column(primary_key=True)
|
id: Mapped[int] = mapped_column(primary_key=True)
|
||||||
email: Mapped[str] = mapped_column(String(254), unique=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))
|
password_hash: Mapped[str] = mapped_column(VARCHAR(255))
|
||||||
|
|
||||||
subscriptions: Mapped[list['SubscriptionModel']] = relationship(back_populates='user')
|
subscriptions: Mapped[list['SubscriptionModel']] = relationship(back_populates='user')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue