Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor: migrate TrialApp and AccountTrialAppRecord to TypeBase (#34897)

sxxtony660c7e4a43aa
diff --git a/api/models/model.py b/api/models/model.py
index d2ff8065e2e..0ea2259a194 100644
--- a/api/models/model.py
+++ b/api/models/model.py
@@ -913,11 +913,7 @@ class TrialApp(TypeBase):
app_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
tenant_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
created_at: Mapped[datetime] = mapped_column(
- sa.DateTime,
- nullable=False,
- insert_default=func.current_timestamp(),
- server_default=func.current_timestamp(),
- init=False,
+ sa.DateTime, nullable=False, server_default=func.current_timestamp(), init=False
)
trial_limit: Mapped[int] = mapped_column(sa.Integer, nullable=False, default=3)
@@ -941,11 +937,7 @@ class AccountTrialAppRecord(TypeBase):
app_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
count: Mapped[int] = mapped_column(sa.Integer, nullable=False, default=0)
created_at: Mapped[datetime] = mapped_column(
- sa.DateTime,
- nullable=False,
- insert_default=func.current_timestamp(),
- server_default=func.current_timestamp(),
- init=False,
+ sa.DateTime, nullable=False, server_default=func.current_timestamp(), init=False
)
@property