"""add customer_name, extend admin_note to 1000

Revision ID: dcf00fe7055b
Revises: 662fe15c38f0
Create Date: 2026-07-15 08:16:08.471890
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

revision: str = 'dcf00fe7055b'
down_revision: Union[str, None] = '662fe15c38f0'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column('users', sa.Column('customer_name', sa.String(length=200), nullable=True))
    op.alter_column('users', 'admin_note',
               existing_type=sa.VARCHAR(length=500),
               type_=sa.String(length=1000),
               existing_nullable=True)


def downgrade() -> None:
    op.alter_column('users', 'admin_note',
               existing_type=sa.String(length=1000),
               type_=sa.VARCHAR(length=500),
               existing_nullable=True)
    op.drop_column('users', 'customer_name')
