"""empty message

Revision ID: f1bc3fa623c7
Revises: 75c07cb9cfe3
Create Date: 2020-07-07 15:49:58.653888

"""
import sqlalchemy as sa
from alembic import op

from project import dbtypes
from project.models import EventAttendanceMode, EventStatus, EventTargetGroupOrigin

# revision identifiers, used by Alembic.
revision = "f1bc3fa623c7"
down_revision = "75c07cb9cfe3"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "event", sa.Column("accessible_for_free", sa.Boolean(), nullable=True)
    )
    op.add_column("event", sa.Column("age_from", sa.Integer(), nullable=True))
    op.add_column("event", sa.Column("age_to", sa.Integer(), nullable=True))
    op.add_column(
        "event",
        sa.Column(
            "attendance_mode", dbtypes.IntegerEnum(EventAttendanceMode), nullable=True
        ),
    )
    op.add_column("event", sa.Column("kid_friendly", sa.Boolean(), nullable=True))
    op.add_column(
        "event", sa.Column("status", dbtypes.IntegerEnum(EventStatus), nullable=True)
    )
    op.add_column("event", sa.Column("tags", sa.UnicodeText(), nullable=True))
    op.add_column(
        "event",
        sa.Column(
            "target_group_origin",
            dbtypes.IntegerEnum(EventTargetGroupOrigin),
            nullable=True,
        ),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("event", "target_group_origin")
    op.drop_column("event", "tags")
    op.drop_column("event", "status")
    op.drop_column("event", "kid_friendly")
    op.drop_column("event", "attendance_mode")
    op.drop_column("event", "age_to")
    op.drop_column("event", "age_from")
    op.drop_column("event", "accessible_for_free")
    # ### end Alembic commands ###
