"""empty message

Revision ID: 644500e01519
Revises: f406983b63d0
Create Date: 2026-04-22 10:47:35.502740

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '644500e01519'
down_revision: Union[str, Sequence[str], None] = 'f406983b63d0'
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! ###
    with op.batch_alter_table('tasks', schema=None) as batch_op:
        batch_op.drop_constraint(batch_op.f('fk_tasks__workspace_id_workspaces'), type_='foreignkey')
        batch_op.create_foreign_key(None, 'workspaces', ['_workspace_id'], ['id'], ondelete='CASCADE')

    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('tasks', schema=None) as batch_op:
        batch_op.drop_constraint(None, type_='foreignkey')
        batch_op.create_foreign_key(batch_op.f('fk_tasks__workspace_id_workspaces'), 'workspaces', ['_workspace_id'], ['id'])

    # ### end Alembic commands ###
