"""empty message

Revision ID: 3904d2d24ef7
Revises: 
Create Date: 2020-06-08 10:34:01.995315

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('attendances',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('uid', sa.Integer(), nullable=False),
    sa.Column('datetime', sa.DateTime(), nullable=False),
    sa.Column('punctual', sa.BOOLEAN(), nullable=False),
    sa.Column('team_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(('team_id',), ['teams.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_attendances_datetime'), 'attendances', ['datetime'], unique=False)
    op.create_index(op.f('ix_teams_check_e'), 'teams', ['check_e'], unique=False)
    op.create_index(op.f('ix_teams_check_s'), 'teams', ['check_s'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_teams_check_s'), table_name='teams')
    op.drop_index(op.f('ix_teams_check_e'), table_name='teams')
    op.drop_index(op.f('ix_attendances_datetime'), table_name='attendances')
    op.drop_table('attendances')
    # ### end Alembic commands ###
