diff --git a/backend/open_webui/apps/webui/models/groups.py b/backend/open_webui/apps/webui/models/groups.py index 89717e16b..e687374ea 100644 --- a/backend/open_webui/apps/webui/models/groups.py +++ b/backend/open_webui/apps/webui/models/groups.py @@ -30,6 +30,8 @@ class Group(Base): name = Column(Text) description = Column(Text) + + data = Column(JSON, nullable=True) meta = Column(JSON, nullable=True) permissions = Column(JSON, nullable=True) @@ -46,6 +48,8 @@ class GroupModel(BaseModel): name: str description: str + + data: Optional[dict] = None meta: Optional[dict] = None permissions: Optional[dict] = None @@ -66,6 +70,7 @@ class GroupResponse(BaseModel): name: str description: str permissions: Optional[dict] = None + data: Optional[dict] = None meta: Optional[dict] = None user_ids: list[str] = [] created_at: int # timestamp in epoch diff --git a/backend/open_webui/migrations/versions/922e7a387820_add_group_table.py b/backend/open_webui/migrations/versions/922e7a387820_add_group_table.py index bdab303a7..a75211584 100644 --- a/backend/open_webui/migrations/versions/922e7a387820_add_group_table.py +++ b/backend/open_webui/migrations/versions/922e7a387820_add_group_table.py @@ -22,6 +22,7 @@ def upgrade(): sa.Column("user_id", sa.Text(), nullable=True), sa.Column("name", sa.Text(), nullable=True), sa.Column("description", sa.Text(), nullable=True), + sa.Column("data", sa.JSON(), nullable=True), sa.Column("meta", sa.JSON(), nullable=True), sa.Column("permissions", sa.JSON(), nullable=True), sa.Column("user_ids", sa.JSON(), nullable=True),