ECO-171: update to use server default time stamp

This commit is contained in:
Charles Yao 2025-11-23 23:00:10 -06:00
parent 5b93ed3fcd
commit f2df8af4c8
1 changed files with 2 additions and 2 deletions

View File

@ -138,12 +138,12 @@ class EndUserAuthenticationProvider(TypeBase):
# encrypted credentials for the end user
encrypted_credentials: Mapped[str] = mapped_column(LongText, nullable=False, default="")
created_at: Mapped[datetime] = mapped_column(
sa.DateTime, nullable=False, default=datetime.now, init=False
sa.DateTime, nullable=False, server_default=func.current_timestamp(), init=False
)
updated_at: Mapped[datetime] = mapped_column(
sa.DateTime,
nullable=False,
default=datetime.now,
server_default=func.current_timestamp(),
onupdate=func.current_timestamp(),
init=False,
)