"""empty message

Revision ID: 8cabe970f3af
Revises: b5e8b9ce3d51
Create Date: 2023-02-28 11:55:41.802531

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = '8cabe970f3af'
down_revision = 'b5e8b9ce3d51'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('doctors', schema=None) as batch_op:
        batch_op.add_column(sa.Column('img_render', sa.String(length=50), nullable=True))
        batch_op.drop_column('img_name')

    with op.batch_alter_table('patients', schema=None) as batch_op:
        batch_op.drop_column('img_data')
        batch_op.drop_column('img_name')

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('patients', schema=None) as batch_op:
        batch_op.add_column(sa.Column('img_name', mysql.VARCHAR(length=50), nullable=True))
        batch_op.add_column(sa.Column('img_data', sa.BLOB(), nullable=True))

    with op.batch_alter_table('doctors', schema=None) as batch_op:
        batch_op.add_column(sa.Column('img_name', mysql.VARCHAR(length=50), nullable=True))
        batch_op.drop_column('img_render')

    # ### end Alembic commands ###
