chore(models): remove redundant server_default from trigger models (#42519)

This commit is contained in:
william
2026-09-20 02:47:05 +00:00
committed by GitHub
parent 77d701ae81
commit 4da38ea322
+3 -6
View File
@@ -111,10 +111,7 @@ class TriggerSubscription(TypeBase):
Integer, default=-1, comment="Subscription instance expiration timestamp, -1 for never"
)
visibility: Mapped[PermissionEnum] = mapped_column(
EnumText(PermissionEnum, length=40),
nullable=False,
server_default=sa.text("'all_team_members'"),
default=PermissionEnum.ALL_TEAM,
EnumText(PermissionEnum, length=40), nullable=False, default=PermissionEnum.ALL_TEAM
)
created_at: Mapped[datetime] = mapped_column(
@@ -199,7 +196,7 @@ class TriggerOAuthTenantClient(TypeBase):
tenant_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
plugin_id: Mapped[str] = mapped_column(String(255), nullable=False)
provider: Mapped[str] = mapped_column(String(255), nullable=False)
enabled: Mapped[bool] = mapped_column(sa.Boolean, nullable=False, server_default=sa.true(), default=True)
enabled: Mapped[bool] = mapped_column(sa.Boolean, nullable=False, default=True)
# oauth params of the trigger provider
encrypted_oauth_params: Mapped[str] = mapped_column(LongText, nullable=False, default="{}")
created_at: Mapped[datetime] = mapped_column(
@@ -465,7 +462,7 @@ class AppTrigger(TypeBase):
node_id: Mapped[str | None] = mapped_column(String(64), nullable=False)
trigger_type: Mapped[str] = mapped_column(EnumText(AppTriggerType, length=50), nullable=False)
title: Mapped[str] = mapped_column(String(255), nullable=False)
provider_name: Mapped[str | None] = mapped_column(String(255), nullable=True, server_default="", default="")
provider_name: Mapped[str | None] = mapped_column(String(255), nullable=True, default="")
status: Mapped[str] = mapped_column(
EnumText(AppTriggerStatus, length=50), nullable=False, default=AppTriggerStatus.ENABLED
)