mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-11 16:28:58 +08:00
fix(workflow): update updated_at default to use UTC timezone (#11960)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
6b49889041
commit
750662eb08
@ -1,6 +1,6 @@
|
||||
import json
|
||||
from collections.abc import Mapping, Sequence
|
||||
from datetime import datetime
|
||||
from datetime import UTC, datetime
|
||||
from enum import Enum, StrEnum
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
@ -106,7 +106,10 @@ class Workflow(db.Model):
|
||||
created_at: Mapped[datetime] = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
||||
updated_by: Mapped[Optional[str]] = mapped_column(StringUUID)
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
db.DateTime, nullable=False, server_default=func.current_timestamp(), server_onupdate=func.current_timestamp()
|
||||
db.DateTime,
|
||||
nullable=False,
|
||||
default=datetime.now(UTC).replace(tzinfo=None),
|
||||
server_onupdate=func.current_timestamp(),
|
||||
)
|
||||
_environment_variables: Mapped[str] = mapped_column(
|
||||
"environment_variables", db.Text, nullable=False, server_default="{}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user