mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 20:17:29 +08:00
ECO-171: update to use server default time stamp
This commit is contained in:
parent
5b93ed3fcd
commit
f2df8af4c8
@ -138,12 +138,12 @@ class EndUserAuthenticationProvider(TypeBase):
|
|||||||
# encrypted credentials for the end user
|
# encrypted credentials for the end user
|
||||||
encrypted_credentials: Mapped[str] = mapped_column(LongText, nullable=False, default="")
|
encrypted_credentials: Mapped[str] = mapped_column(LongText, nullable=False, default="")
|
||||||
created_at: Mapped[datetime] = mapped_column(
|
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(
|
updated_at: Mapped[datetime] = mapped_column(
|
||||||
sa.DateTime,
|
sa.DateTime,
|
||||||
nullable=False,
|
nullable=False,
|
||||||
default=datetime.now,
|
server_default=func.current_timestamp(),
|
||||||
onupdate=func.current_timestamp(),
|
onupdate=func.current_timestamp(),
|
||||||
init=False,
|
init=False,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user