Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions backend/app/alembic/versions/098_drop_openai_thread_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
"""drop openai_thread

Revision ID: 098
Revises: 097
Create Date: 2026-12-04 00:00:00.000000

The Threads module was removed, so nothing reads or writes this table any more.
Rows are lost on upgrade; downgrade restores the schema as it stood at 097 (an
empty table) so older code can boot, not the data.
"""

import sqlalchemy as sa
from alembic import op

revision = "098"
down_revision = "097"
branch_labels = None
depends_on = None


def upgrade():
op.drop_table("openai_thread")


def downgrade():
op.create_table(
"openai_thread",
sa.Column(
"id",
sa.Integer(),
nullable=False,
comment="Unique identifier for the thread record",
),
sa.Column(
"thread_id",
sa.String(),
nullable=False,
comment="OpenAI thread identifier",
),
sa.Column(
"prompt",
sa.String(),
nullable=False,
comment="User prompt sent to the thread",
),
sa.Column(
"response",
sa.String(),
nullable=True,
comment="Response received from OpenAI",
),
sa.Column(
"status",
sa.String(),
nullable=True,
comment="Current status of the thread interaction",
),
sa.Column(
"error",
sa.String(),
nullable=True,
comment="Error message if the interaction failed",
),
sa.Column(
"inserted_at",
sa.DateTime(),
nullable=False,
comment="Timestamp when the record was created",
),
sa.Column(
"updated_at",
sa.DateTime(),
nullable=False,
comment="Timestamp when the record was last updated",
),
sa.PrimaryKeyConstraint("id"),
)
op.create_index(
"ix_openai_thread_thread_id", "openai_thread", ["thread_id"], unique=True
)
7 changes: 1 addition & 6 deletions backend/app/api/docs/openapi_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@
"[**Deprecated**] OpenAI Assistant creation and management. This "
"feature will be removed in a future version."
),
"Threads": (
"[**Deprecated**] Conversation thread management for assistants. This "
"feature will be removed in a future version."
),
"Users": (
"User accounts: read, update or delete your own profile and change your "
"password; superusers can also create users."
Expand Down Expand Up @@ -159,7 +155,6 @@
"Assessment",
"Assessment (Experimental)",
"Assistants",
"Threads",
],
},
{
Expand Down Expand Up @@ -194,7 +189,7 @@ def customize_openapi_schema(openapi_schema: dict) -> dict:
"""
openapi_schema = inject_component_schemas(openapi_schema)
openapi_schema["x-tagGroups"] = tag_groups
deprecated_tags = ["Assistants", "Threads"]
deprecated_tags = ["Assistants"]

for _, path_item in openapi_schema.get("paths", {}).items():
for method, operation in path_item.items():
Expand Down
41 changes: 0 additions & 41 deletions backend/app/api/docs/threads/examples.py

This file was deleted.

2 changes: 0 additions & 2 deletions backend/app/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
onboarding,
organization,
project,
threads,
user_project,
users,
utils,
Expand Down Expand Up @@ -66,7 +65,6 @@
api_router.include_router(onboarding.router)
api_router.include_router(organization.router)
api_router.include_router(project.router)
api_router.include_router(threads.router)
api_router.include_router(user_project.router)
api_router.include_router(users.router)
api_router.include_router(utils.router)
Expand Down
Loading
Loading