"""topic machine name

Revision ID: 52e8d73b69ba
Revises: 86b6fd708bd0
Create Date: 2024-01-27 20:40:15.535403

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '52e8d73b69ba'
down_revision = '86b6fd708bd0'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('topic', schema=None) as batch_op:
        batch_op.add_column(sa.Column('machine_name', sa.String(length=50), nullable=True))
        batch_op.create_index(batch_op.f('ix_topic_machine_name'), ['machine_name'], unique=False)

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('topic', schema=None) as batch_op:
        batch_op.drop_index(batch_op.f('ix_topic_machine_name'))
        batch_op.drop_column('machine_name')

    # ### end Alembic commands ###