"""Remove not null constraint from source language in TranslationCache

Revision ID: 057fb975f0e3
Revises: bb67d16f428a
Create Date: 2025-06-27 13:09:28.171399

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '057fb975f0e3'
down_revision = 'bb67d16f428a'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('translation_cache', schema=None) as batch_op:
        batch_op.alter_column('source_language',
               existing_type=sa.VARCHAR(length=2),
               nullable=True)

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('translation_cache', schema=None) as batch_op:
        batch_op.alter_column('source_language',
               existing_type=sa.VARCHAR(length=2),
               nullable=False)

    # ### end Alembic commands ###
