diff --git a/src/backend/langflow/services/database/models/variable/model.py b/src/backend/langflow/services/database/models/variable/model.py index 3b9e6b2eb..5ad2af23b 100644 --- a/src/backend/langflow/services/database/models/variable/model.py +++ b/src/backend/langflow/services/database/models/variable/model.py @@ -20,17 +20,26 @@ class VariableBase(SQLModel): class Variable(VariableBase, table=True): - id: Optional[UUID] = Field(default_factory=uuid4, primary_key=True, description="Unique ID for the variable") + id: Optional[UUID] = Field( + default_factory=uuid4, + primary_key=True, + description="Unique ID for the variable", + ) # name is unique per user - created_at: datetime = Field(default_factory=utc_now, description="Creation time of the variable") - updated_at: Optional[datetime] = Field(None, description="Last update time of the variable") + created_at: datetime = Field( + default_factory=utc_now, description="Creation time of the variable" + ) + updated_at: Optional[datetime] = Field( + None, description="Last update time of the variable" + ) # foreign key to user table - user_id: UUID = Field(description="User ID associated with this variable", foreign_key="user.id") + user_id: UUID = Field( + description="User ID associated with this variable", foreign_key="user.id" + ) user: "User" = Relationship(back_populates="variables") class VariableCreate(VariableBase): - # AcceptedProviders is a custom Enum type: Optional[str] = Field(None, description="Type of the variable")