"""set logo to none

Revision ID: e25328dbfe80
Revises: ffe7a88d5b15
Create Date: 2025-04-09 11:17:59.990186

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e25328dbfe80'
down_revision = 'ffe7a88d5b15'
branch_labels = None
depends_on = None


def upgrade():
    op.execute("UPDATE server SET logo = NULL WHERE logo = ''")
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('server', 'logo',
               existing_type=sa.VARCHAR(),
               nullable=True)
    # ### end Alembic commands ###


def downgrade():
    op.execute("UPDATE server SET logo = '' WHERE logo IS NULL")
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('server', 'logo',
               existing_type=sa.VARCHAR(),
               nullable=False)
    # ### end Alembic commands ###
