"""Add tracked_time_minutes to assignments

Revision ID: 029_add_tracked_time
Revises: 028_add_promo_codes
Create Date: 2026-01-10

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '029_add_tracked_time'
down_revision: Union[str, None] = '028_add_promo_codes'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # Add tracked_time_minutes column to assignments table
    op.add_column(
        'assignments',
        sa.Column('tracked_time_minutes', sa.Integer(), nullable=False, server_default='0')
    )


def downgrade() -> None:
    op.drop_column('assignments', 'tracked_time_minutes')
