"""calendar

Revision ID: 61989518eac8
Revises: 37ffb09a14ee
Create Date: 2023-09-01 16:46:30.441293

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '61989518eac8'
down_revision = '37ffb09a14ee'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_calendar', sa.Column('is_default', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('period', sa.Integer(), nullable=True))
    op.add_column('cmf_calendar_exclude', sa.Column('month', sa.Integer(), nullable=True))
    op.add_column('cmf_calendar_exclude', sa.Column('month_day', sa.Integer(), nullable=True))
    op.add_column('cmf_calendar_exclude', sa.Column('month_day_week', sa.Integer(), nullable=True))
    op.add_column('cmf_calendar_exclude', sa.Column('month_week_position', sa.Integer(), nullable=True))
    op.add_column('cmf_calendar_exclude', sa.Column('day_of_week0', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('day_of_week1', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('day_of_week2', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('day_of_week3', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('day_of_week4', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('day_of_week5', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('day_of_week6', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_exclude', sa.Column('is_auto', sa.Boolean(), nullable=False, server_default='false'))
    op.add_column('cmf_calendar_work_week_interval', sa.Column('interval_type', sa.String(length=32), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('cmf_calendar_work_week_interval', 'interval_type')
    op.drop_column('cmf_calendar_exclude', 'is_auto')
    op.drop_column('cmf_calendar_exclude', 'day_of_week6')
    op.drop_column('cmf_calendar_exclude', 'day_of_week5')
    op.drop_column('cmf_calendar_exclude', 'day_of_week4')
    op.drop_column('cmf_calendar_exclude', 'day_of_week3')
    op.drop_column('cmf_calendar_exclude', 'day_of_week2')
    op.drop_column('cmf_calendar_exclude', 'day_of_week1')
    op.drop_column('cmf_calendar_exclude', 'day_of_week0')
    op.drop_column('cmf_calendar_exclude', 'month_week_position')
    op.drop_column('cmf_calendar_exclude', 'month_day_week')
    op.drop_column('cmf_calendar_exclude', 'month_day')
    op.drop_column('cmf_calendar_exclude', 'month')
    op.drop_column('cmf_calendar_exclude', 'period')
    op.drop_column('cmf_calendar', 'is_default')
    # ### end Alembic commands ###
