"""create table attendance

Revision ID: d69500c3db39
Revises: e6ea3038c8c1
Create Date: 2019-10-22 12:11:39.267479

"""
from alembic import op
import sqlalchemy as sa
from app.models import AttendanceStatus

# revision identifiers, used by Alembic.
revision = 'd69500c3db39'
down_revision = 'e6ea3038c8c1'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('attendance',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('student_id', sa.Integer(), nullable=False),
        sa.Column('status', sa.Enum(AttendanceStatus)),
        sa.Column('created_at', sa.DateTime(), nullable=False),
        sa.PrimaryKeyConstraint('id',name=op.f('attendance_pkey'))
    )
    op.create_foreign_key('attendance_to_student_fk','attendance','student',['student_id'],['id'])

def downgrade():
    op.drop_constraint('attendance_to_student_fk')
    op.drop_table('attendance')

1c396c448beaf7425cc481525ad41c6a146d3280
<mask token>


def downgrade():
    op.drop_constraint('attendance_to_student_fk')
    op.drop_table('attendance')

<mask token>


def upgrade():
    op.create_table('attendance', sa.Column('id', sa.Integer(), nullable=
        False), sa.Column('student_id', sa.Integer(), nullable=False), sa.
        Column('status', sa.Enum(AttendanceStatus)), sa.Column('created_at',
        sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id', name=
        op.f('attendance_pkey')))
    op.create_foreign_key('attendance_to_student_fk', 'attendance',
        'student', ['student_id'], ['id'])


def downgrade():
    op.drop_constraint('attendance_to_student_fk')
    op.drop_table('attendance')

<mask token>
revision = 'd69500c3db39'
down_revision = 'e6ea3038c8c1'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('attendance', sa.Column('id', sa.Integer(), nullable=
        False), sa.Column('student_id', sa.Integer(), nullable=False), sa.
        Column('status', sa.Enum(AttendanceStatus)), sa.Column('created_at',
        sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id', name=
        op.f('attendance_pkey')))
    op.create_foreign_key('attendance_to_student_fk', 'attendance',
        'student', ['student_id'], ['id'])


def downgrade():
    op.drop_constraint('attendance_to_student_fk')
    op.drop_table('attendance')

<mask token>
from alembic import op
import sqlalchemy as sa
from app.models import AttendanceStatus
revision = 'd69500c3db39'
down_revision = 'e6ea3038c8c1'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('attendance', sa.Column('id', sa.Integer(), nullable=
        False), sa.Column('student_id', sa.Integer(), nullable=False), sa.
        Column('status', sa.Enum(AttendanceStatus)), sa.Column('created_at',
        sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id', name=
        op.f('attendance_pkey')))
    op.create_foreign_key('attendance_to_student_fk', 'attendance',
        'student', ['student_id'], ['id'])


def downgrade():
    op.drop_constraint('attendance_to_student_fk')
    op.drop_table('attendance')

"""create table attendance

Revision ID: d69500c3db39
Revises: e6ea3038c8c1
Create Date: 2019-10-22 12:11:39.267479

"""
from alembic import op
import sqlalchemy as sa
from app.models import AttendanceStatus

# revision identifiers, used by Alembic.
revision = 'd69500c3db39'
down_revision = 'e6ea3038c8c1'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('attendance',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('student_id', sa.Integer(), nullable=False),
        sa.Column('status', sa.Enum(AttendanceStatus)),
        sa.Column('created_at', sa.DateTime(), nullable=False),
        sa.PrimaryKeyConstraint('id',name=op.f('attendance_pkey'))
    )
    op.create_foreign_key('attendance_to_student_fk','attendance','student',['student_id'],['id'])

def downgrade():
    op.drop_constraint('attendance_to_student_fk')
    op.drop_table('attendance')
