"""empty message

Revision ID: 8282ffed4c74
Revises: 7a60fc798c62
Create Date: 2022-01-08 18:30:38.968558

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '8282ffed4c74'
down_revision = '7a60fc798c62'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('advanced',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=100), nullable=False),
    sa.Column('starting_time', sa.String(length=50), nullable=False),
    sa.Column('note', sa.Text(), nullable=False),
    sa.Column('photo_url', sa.String(length=255), nullable=False),
    sa.Column('participants', sa.Text(), nullable=True),
    sa.Column('coach_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['coach_id'], ['coaches.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('beginners',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=100), nullable=False),
    sa.Column('starting_time', sa.String(length=50), nullable=False),
    sa.Column('note', sa.Text(), nullable=False),
    sa.Column('photo_url', sa.String(length=255), nullable=False),
    sa.Column('participants', sa.Text(), nullable=True),
    sa.Column('coach_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['coach_id'], ['coaches.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.alter_column('coaches', 'belt',
               existing_type=sa.VARCHAR(length=255),
               nullable=False)
    op.alter_column('students', 'belt',
               existing_type=sa.VARCHAR(length=255),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('students', 'belt',
               existing_type=sa.VARCHAR(length=255),
               nullable=True)
    op.alter_column('coaches', 'belt',
               existing_type=sa.VARCHAR(length=255),
               nullable=True)
    op.drop_table('beginners')
    op.drop_table('advanced')
    # ### end Alembic commands ###
