"""empty message

Revision ID: ddcae1777684
Revises: 
Create Date: 2018-10-21 20:21:09.755553

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('axf_foodtype',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('typeid', sa.INTEGER(), nullable=True),
    sa.Column('typename', sa.String(length=32), nullable=True),
    sa.Column('childtypenames', sa.String(length=256), nullable=True),
    sa.Column('typesort', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_goods',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('productid', sa.INTEGER(), nullable=True),
    sa.Column('productimg', sa.String(length=256), nullable=True),
    sa.Column('productname', sa.String(length=128), nullable=True),
    sa.Column('productlongname', sa.String(length=256), nullable=True),
    sa.Column('isxf', sa.Boolean(), nullable=True),
    sa.Column('pmdesc', sa.Boolean(), nullable=True),
    sa.Column('specifics', sa.String(length=64), nullable=True),
    sa.Column('price', sa.Float(), nullable=True),
    sa.Column('marketprice', sa.Float(), nullable=True),
    sa.Column('categoryid', sa.INTEGER(), nullable=True),
    sa.Column('childcid', sa.INTEGER(), nullable=True),
    sa.Column('childcidname', sa.String(length=128), nullable=True),
    sa.Column('dealerid', sa.INTEGER(), nullable=True),
    sa.Column('storenums', sa.INTEGER(), nullable=True),
    sa.Column('productnum', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_mainshow',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('img', sa.String(length=256), nullable=True),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('trackid', sa.INTEGER(), nullable=True),
    sa.Column('categoryid', sa.INTEGER(), nullable=True),
    sa.Column('brandname', sa.String(length=64), nullable=True),
    sa.Column('img1', sa.String(length=255), nullable=True),
    sa.Column('childcid1', sa.INTEGER(), nullable=True),
    sa.Column('productid1', sa.INTEGER(), nullable=True),
    sa.Column('longname1', sa.String(length=128), nullable=True),
    sa.Column('price1', sa.Float(), nullable=True),
    sa.Column('marketprice1', sa.Float(), nullable=True),
    sa.Column('img2', sa.String(length=255), nullable=True),
    sa.Column('childcid2', sa.INTEGER(), nullable=True),
    sa.Column('productid2', sa.INTEGER(), nullable=True),
    sa.Column('longname2', sa.String(length=128), nullable=True),
    sa.Column('price2', sa.Float(), nullable=True),
    sa.Column('marketprice2', sa.Float(), nullable=True),
    sa.Column('img3', sa.String(length=255), nullable=True),
    sa.Column('childcid3', sa.INTEGER(), nullable=True),
    sa.Column('productid3', sa.INTEGER(), nullable=True),
    sa.Column('longname3', sa.String(length=128), nullable=True),
    sa.Column('price3', sa.Float(), nullable=True),
    sa.Column('marketprice3', sa.Float(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_mustbuy',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('img', sa.String(length=256), nullable=True),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('trackid', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_nav',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('img', sa.String(length=256), nullable=True),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('trackid', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_shop',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('img', sa.String(length=256), nullable=True),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('trackid', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_user',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('u_username', sa.String(length=32), nullable=True),
    sa.Column('u_password', sa.String(length=256), nullable=True),
    sa.Column('u_email', sa.String(length=64), nullable=True),
    sa.Column('u_icon', sa.String(length=256), nullable=True),
    sa.Column('is_active', sa.Boolean(), nullable=True),
    sa.Column('is_delete', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('u_email'),
    sa.UniqueConstraint('u_icon'),
    sa.UniqueConstraint('u_password'),
    sa.UniqueConstraint('u_username')
    )
    op.create_table('axf_wheel',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('img', sa.String(length=256), nullable=True),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('trackid', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_cart',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('c_user', sa.INTEGER(), nullable=True),
    sa.Column('c_goods', sa.INTEGER(), nullable=True),
    sa.Column('c_goods_num', sa.INTEGER(), nullable=True),
    sa.Column('c_is_select', sa.Boolean(), nullable=True),
    sa.ForeignKeyConstraint(['c_goods'], ['axf_goods.id'], ),
    sa.ForeignKeyConstraint(['c_user'], ['axf_user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('axf_cart')
    op.drop_table('axf_wheel')
    op.drop_table('axf_user')
    op.drop_table('axf_shop')
    op.drop_table('axf_nav')
    op.drop_table('axf_mustbuy')
    op.drop_table('axf_mainshow')
    op.drop_table('axf_goods')
    op.drop_table('axf_foodtype')
    # ### end Alembic commands ###
