Skip to content

Commit

Permalink
Merge pull request #1 from MarceloNunesAlves/fix/db_description_type
Browse files Browse the repository at this point in the history
fix: Problem in the description field when using the MariaDB or MySQL.
  • Loading branch information
MarceloNunesAlves authored Aug 19, 2024
2 parents ebc2e7d + 797d473 commit 7c008c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from emoji import purely_emoji # type: ignore
from fastapi import HTTPException, status
from pydantic import field_serializer, field_validator
from sqlalchemy import UniqueConstraint
from sqlalchemy import UniqueConstraint, Text
from sqlmodel import JSON, Column, Field, Relationship, SQLModel

from langflow.schema import Data
Expand All @@ -25,7 +25,7 @@

class FlowBase(SQLModel):
name: str = Field(index=True)
description: Optional[str] = Field(index=True, nullable=True, default=None)
description: Optional[str] = Field(sa_column=Column(Text, index=True, nullable=True, default=None))
icon: Optional[str] = Field(default=None, nullable=True)
icon_bg_color: Optional[str] = Field(default=None, nullable=True)
data: Optional[Dict] = Field(default=None, nullable=True)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import TYPE_CHECKING, List, Optional
from uuid import UUID, uuid4

from sqlalchemy import UniqueConstraint
from sqlmodel import Field, Relationship, SQLModel
from sqlalchemy import UniqueConstraint, Text
from sqlmodel import Field, Relationship, SQLModel, Column

from langflow.services.database.models.flow.model import FlowRead

Expand All @@ -13,7 +13,7 @@

class FolderBase(SQLModel):
name: str = Field(index=True)
description: Optional[str] = Field(default=None)
description: Optional[str] = Field(default=None, sa_column=Column(Text))


class Folder(FolderBase, table=True): # type: ignore
Expand Down

0 comments on commit 7c008c8

Please sign in to comment.