"""add cascade delete to scans and logs

Revision ID: ba3d00e11612
Revises: 2da47dbd4a52
Create Date: 2025-06-08 22:11:30.281117

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'ba3d00e11612'
down_revision: Union[str, None] = '2da47dbd4a52'
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.alter_column('scans', 'sketch_id',
               existing_type=sa.UUID(),
               nullable=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('scans', 'sketch_id',
               existing_type=sa.UUID(),
               nullable=False)
    # ### end Alembic commands ###
