"""add model column to task v1 & v2 tables

Revision ID: babaa7307e8a
Revises: af49ca791fc7
Create Date: 2025-05-31 03:00:17.128919+00:00

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "babaa7307e8a"
down_revision: Union[str, None] = "af49ca791fc7"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("observer_cruises", sa.Column("model", sa.JSON(), nullable=True))
    op.add_column("tasks", sa.Column("model", sa.JSON(), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("tasks", "model")
    op.drop_column("observer_cruises", "model")
    # ### end Alembic commands ###
