add public_share_token column to migration

This commit is contained in:
CREDO23 2026-01-23 19:57:08 +02:00
parent f42a11023f
commit 87183d1eb7

View file

@ -10,6 +10,10 @@ public sharing of chat threads via secure tokenized URLs.
from collections.abc import Sequence from collections.abc import Sequence
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision: str = "79" revision: str = "79"
down_revision: str | None = "78" down_revision: str | None = "78"
@ -19,9 +23,13 @@ depends_on: str | Sequence[str] | None = None
def upgrade() -> None: def upgrade() -> None:
"""Add public sharing columns to new_chat_threads.""" """Add public sharing columns to new_chat_threads."""
pass # Add public_share_token column
op.add_column(
"new_chat_threads",
sa.Column("public_share_token", sa.String(64), nullable=True),
)
def downgrade() -> None: def downgrade() -> None:
"""Remove public sharing columns from new_chat_threads.""" """Remove public sharing columns from new_chat_threads."""
pass op.drop_column("new_chat_threads", "public_share_token")