This commit is contained in:
Timothy Jaeryang Baek 2024-12-22 22:08:27 -07:00
parent c6dcac99ac
commit 5748f6ef77
2 changed files with 5 additions and 1 deletions

View File

@ -21,7 +21,7 @@ def upgrade():
sa.Column("id", sa.Text(), nullable=False, primary_key=True, unique=True),
sa.Column("user_id", sa.Text()),
sa.Column("name", sa.Text()),
sa.Column("description", sa.Text()),
sa.Column("description", sa.Text(), nullable=True),
sa.Column("data", sa.JSON(), nullable=True),
sa.Column("meta", sa.JSON(), nullable=True),
sa.Column("access_control", sa.JSON(), nullable=True),

View File

@ -23,6 +23,8 @@ class Channel(Base):
user_id = Column(Text)
name = Column(Text)
description = Column(Text, nullable=True)
data = Column(JSON, nullable=True)
meta = Column(JSON, nullable=True)
access_control = Column(JSON, nullable=True)
@ -36,6 +38,7 @@ class ChannelModel(BaseModel):
id: str
user_id: str
description: Optional[str] = None
name: str
data: Optional[dict] = None
@ -53,6 +56,7 @@ class ChannelModel(BaseModel):
class ChannelForm(BaseModel):
name: str
description: Optional[str] = None
data: Optional[dict] = None
meta: Optional[dict] = None
access_control: Optional[dict] = None