"""empty message

Revision ID: 62b3ef735c99
Revises: 3904d2d24ef7
Create Date: 2020-06-08 17:25:57.095152

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '62b3ef735c99'
down_revision = '3904d2d24ef7'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('attendances_ibfk_1', 'attendances', type_='foreignkey')
    op.create_foreign_key(None, 'attendances', 'teams', ['team_id'], ['id'], ondelete='CASCADE')
    op.drop_constraint('schedules_ibfk_1', 'schedules', type_='foreignkey')
    op.create_foreign_key(None, 'schedules', 'teams', ['team_id'], ['id'], ondelete='CASCADE')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'schedules', type_='foreignkey')
    op.create_foreign_key('schedules_ibfk_1', 'schedules', 'teams', ['team_id'], ['id'])
    op.drop_constraint(None, 'attendances', type_='foreignkey')
    op.create_foreign_key('attendances_ibfk_1', 'attendances', 'teams', ['team_id'], ['id'])
    # ### end Alembic commands ###
