"""deployment fields

Revision ID: 3b8b8a5b99ad
Revises: 735603f5e4d5
Create Date: 2025-05-13 06:34:52.115171

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '3b8b8a5b99ad'
down_revision = '735603f5e4d5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('server', sa.Column('repo_url', sa.String(), nullable=True))
    op.add_column('server', sa.Column('command', sa.String(), nullable=True))
    op.alter_column('server', 'url',
               existing_type=sa.VARCHAR(),
               nullable=True)
    op.create_unique_constraint("server_repo_url_unique", 'server', ['repo_url'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint("server_repo_url_unique", 'server', type_='unique')
    op.alter_column('server', 'url',
               existing_type=sa.VARCHAR(),
               nullable=False)
    op.drop_column('server', 'command')
    op.drop_column('server', 'repo_url')
    # ### end Alembic commands ###
