"""server title

Revision ID: 387bed3ce6ae
Revises: 49e1ab420276
Create Date: 2025-04-30 10:49:34.277571

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '387bed3ce6ae'
down_revision = '7a3913a3bb4c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('server', sa.Column('title', sa.String(), nullable=True))
    op.execute("""UPDATE server SET title = name""")
    op.alter_column("server", "title", nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('server', 'title')
    # ### end Alembic commands ###
