"""bigger

Revision ID: 0bcf54a7f2a7
Revises: 28e8e0be0355
Create Date: 2025-08-03 22:22:24.361337

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '0bcf54a7f2a7'
down_revision = '28e8e0be0355'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.alter_column('first_name',
               existing_type=sa.VARCHAR(length=255),
               nullable=False)
        batch_op.alter_column('last_name',
               existing_type=sa.VARCHAR(length=255),
               nullable=False)
        batch_op.alter_column('password_hash',
               existing_type=postgresql.BYTEA(),
               type_=sa.String(length=2048),
               nullable=False)

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.alter_column('password_hash',
               existing_type=sa.String(length=2048),
               type_=postgresql.BYTEA(),
               nullable=True)
        batch_op.alter_column('last_name',
               existing_type=sa.VARCHAR(length=255),
               nullable=True)
        batch_op.alter_column('first_name',
               existing_type=sa.VARCHAR(length=255),
               nullable=True)

    # ### end Alembic commands ###
