"""add sync_to_calendar to event and schedule

Revision ID: 9b59ad77821a
Revises: 901bc86abaf6
Create Date: 2026-07-05 01:21:03.603874

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '9b59ad77821a'
down_revision: Union[str, Sequence[str], None] = '901bc86abaf6'
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(
        'event',
        sa.Column('sync_to_calendar', sa.Boolean(), nullable=False, server_default=sa.true()),
    )
    op.add_column(
        'schedule',
        sa.Column('sync_to_calendar', sa.Boolean(), nullable=False, server_default=sa.true()),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('schedule', 'sync_to_calendar')
    op.drop_column('event', 'sync_to_calendar')
    # ### end Alembic commands ###
