"""Add email and hashed_password to profile

Revision ID: 40ece72583b7
Revises: 965b56353b4c
Create Date: 2025-05-19 15:37:27.466187

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '40ece72583b7'
down_revision: Union[str, None] = '965b56353b4c'
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('profiles', sa.Column('email', sa.String(), nullable=False))
    op.add_column('profiles', sa.Column('hashed_password', sa.String(), nullable=False))
    op.add_column('profiles', sa.Column('is_active', sa.Boolean(), nullable=False))
    op.create_unique_constraint(None, 'profiles', ['email'])
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'profiles', type_='unique')
    op.drop_column('profiles', 'is_active')
    op.drop_column('profiles', 'hashed_password')
    op.drop_column('profiles', 'email')
    # ### end Alembic commands ###
