"""empty message

Revision ID: b7e7d9fc05ac
Revises: 
Create Date: 2018-10-16 14:53:41.641476

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('student',
    sa.Column('s_id', sa.Integer(), nullable=False),
    sa.Column('s_name', sa.String(length=100), nullable=False),
    sa.Column('s_age', sa.Integer(), nullable=False),
    sa.Column('s_sex', sa.String(length=10), nullable=False),
    sa.PrimaryKeyConstraint('s_id')
    )
    op.drop_index('g_name', table_name='grade')
    op.drop_table('grade')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('grade',
    sa.Column('g_id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False),
    sa.Column('g_name', mysql.VARCHAR(length=100), nullable=False),
    sa.Column('g_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('g_id'),
    mysql_collate='utf8mb4_0900_ai_ci',
    mysql_default_charset='utf8mb4',
    mysql_engine='InnoDB'
    )
    op.create_index('g_name', 'grade', ['g_name'], unique=True)
    op.drop_table('student')
    # ### end Alembic commands ###
