"""empty message

Revision ID: 79a94a3f7d84
Revises: 8df5216bc08a
Create Date: 2018-12-19 12:35:38.484193

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

# revision identifiers, used by Alembic.
revision = '79a94a3f7d84'
down_revision = '8df5216bc08a'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    # op.drop_table('anthropometry_tests')
    # op.drop_table('anthropometry_users_tests')
    # op.drop_table('users_tests')
    # op.drop_table('tests')
    # ### end Alembic commands ###
    pass


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tests',
    sa.Column('id', mysql.INTEGER(display_width=11), nullable=False),
    sa.Column('test_name', mysql.VARCHAR(length=100), nullable=True),
    sa.Column('test_category', mysql.VARCHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    mysql_default_charset='latin1',
    mysql_engine='InnoDB'
    )
    op.create_table('users_tests',
    sa.Column('user_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('test_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('date_done', mysql.DATETIME(), nullable=True),
    sa.Column('body_fat_mass', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('body_fat_percentage', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('muscle_mass', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('muscle_mass_percentage', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('thigh', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('waist', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('weight', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['test_id'], ['tests.id'], name='users_tests_ibfk_1'),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='users_tests_ibfk_2'),
    mysql_default_charset='latin1',
    mysql_engine='InnoDB'
    )
    op.create_table('anthropometry_users_tests',
    sa.Column('user_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False),
    sa.Column('test_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False),
    sa.Column('date_done', mysql.DATETIME(), nullable=True),
    sa.Column('weight', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('waist', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('thigh', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('body_fat_percentage', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('body_fat_mass', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('muscle_mass_percentage', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('muscle_mass', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['test_id'], ['anthropometry_tests.id'], name='anthropometry_users_tests_ibfk_1'),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='anthropometry_users_tests_ibfk_2'),
    sa.PrimaryKeyConstraint('user_id', 'test_id'),
    mysql_default_charset='latin1',
    mysql_engine='InnoDB'
    )
    op.create_table('anthropometry_tests',
    sa.Column('id', mysql.INTEGER(display_width=11), nullable=False),
    sa.Column('test_name', mysql.VARCHAR(length=100), nullable=True),
    sa.Column('test_category', mysql.VARCHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    mysql_default_charset='latin1',
    mysql_engine='InnoDB'
    )
    # ### end Alembic commands ###
