"""Create Initial Tables

Revision ID: 07df42b1e585
Revises: 
Create Date: 2019-05-04 16:32:15.172818

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '07df42b1e585'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('volunteer',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=128), nullable=False),
    sa.Column('email', sa.String(length=128), nullable=False),
    sa.Column('phone', sa.String(length=10), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('feedback',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('submitted_by', sa.Integer(), nullable=False),
    sa.Column('color', sa.Enum('Red', 'Yellow', 'Green'), nullable=False),
    sa.Column('datetime', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['submitted_by'], ['volunteer.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('role',
    sa.Column('year', sa.Integer(), nullable=False),
    sa.Column('volunteer', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=100), nullable=False),
    sa.Column('color', sa.Enum('Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Purple', 'Silver'), nullable=True),
    sa.Column('letter', sa.String(length=3), nullable=True),
    sa.ForeignKeyConstraint(['volunteer'], ['volunteer.id'], ),
    sa.PrimaryKeyConstraint('year', 'volunteer')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('role')
    op.drop_table('feedback')
    op.drop_table('volunteer')
    # ### end Alembic commands ###
