Files
Messenger/alembic/versions/0005_chat_public_saved_features.py
benya b9f71b9528
All checks were successful
CI / test (push) Successful in 19s
feat: add saved messages, public chat discovery/join, and chat delete options
- add Saved Messages system chat with dedicated API

- add public group/channel metadata and discover/join endpoints

- add chat delete flow with for_all option and channel-wide delete

- switch message actions to context menu and improve reply/forward visuals

- improve microphone permission handling for voice recording
2026-03-08 00:41:35 +03:00

38 lines
1.5 KiB
Python

"""chat public and saved features
Revision ID: 0005_chat_public_saved_features
Revises: 0004_reply_forward_pin
Create Date: 2026-03-08 04:10:00.000000
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
revision: str = "0005_chat_public_saved_features"
down_revision: Union[str, Sequence[str], None] = "0004_reply_forward_pin"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.add_column("chats", sa.Column("handle", sa.String(length=64), nullable=True))
op.add_column("chats", sa.Column("description", sa.String(length=512), nullable=True))
op.add_column("chats", sa.Column("is_public", sa.Boolean(), server_default=sa.false(), nullable=False))
op.add_column("chats", sa.Column("is_saved", sa.Boolean(), server_default=sa.false(), nullable=False))
op.create_index(op.f("ix_chats_handle"), "chats", ["handle"], unique=True)
op.create_index(op.f("ix_chats_is_public"), "chats", ["is_public"], unique=False)
op.create_index(op.f("ix_chats_is_saved"), "chats", ["is_saved"], unique=False)
def downgrade() -> None:
op.drop_index(op.f("ix_chats_is_saved"), table_name="chats")
op.drop_index(op.f("ix_chats_is_public"), table_name="chats")
op.drop_index(op.f("ix_chats_handle"), table_name="chats")
op.drop_column("chats", "is_saved")
op.drop_column("chats", "is_public")
op.drop_column("chats", "description")
op.drop_column("chats", "handle")