"""Rename location to description in client_groups, add description to clients

Revision ID: 0c47280d3e2d
Revises: 3a09ef909689
Create Date: 2025-07-16 08:47:00.355445

"""
from typing import Sequence, Union

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

# revision identifiers, used by Alembic.
revision: str = '0c47280d3e2d'
down_revision: Union[str, None] = '3a09ef909689'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('client_groups', sa.Column('description', sa.String(length=255), nullable=True))
    op.drop_column('client_groups', 'location')
    op.add_column('clients', sa.Column('description', sa.String(length=255), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('clients', 'description')
    op.add_column('client_groups', sa.Column('location', mysql.VARCHAR(length=100), nullable=True))
    op.drop_column('client_groups', 'description')
    # ### end Alembic commands ###
