Files
tg_bot_language/migrations/versions/20251207_add_translation_language.py

26 lines
694 B
Python
Raw Permalink Normal View History

"""Add translation_language field to users table
Revision ID: 20251207_translation_language
Revises: 20251206_word_translations
Create Date: 2025-12-07
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '20251207_translation_language'
down_revision: Union[str, None] = '20251206_word_translations'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.add_column('users', sa.Column('translation_language', sa.String(2), nullable=True))
def downgrade() -> None:
op.drop_column('users', 'translation_language')