<filename>migrations/versions/f27106770efd_.py
"""empty message

Revision ID: f27106770efd
Revises: 
Create Date: 2018-09-03 17:00:56.514281

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('axf_foodtypes',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('typeid', sa.String(length=16), nullable=True),
    sa.Column('typename', sa.String(length=100), nullable=True),
    sa.Column('childtypenames', sa.String(length=200), 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.String(length=16), nullable=True),
    sa.Column('productimg', sa.String(length=200), nullable=True),
    sa.Column('productname', sa.String(length=100), nullable=True),
    sa.Column('productlongname', sa.String(length=200), nullable=True),
    sa.Column('isxf', sa.Integer(), nullable=True),
    sa.Column('pmdesc', sa.Integer(), nullable=True),
    sa.Column('specifics', sa.String(length=20), nullable=True),
    sa.Column('price', sa.Float(), nullable=True),
    sa.Column('marketprice', sa.Float(), nullable=True),
    sa.Column('categoryid', sa.String(length=16), nullable=True),
    sa.Column('childcid', sa.String(length=20), nullable=True),
    sa.Column('childcidname', sa.String(length=100), nullable=True),
    sa.Column('dealerid', sa.String(length=16), 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=200), nullable=True),
    sa.Column('name', sa.String(length=100), nullable=True),
    sa.Column('trackid', sa.String(length=50), nullable=True),
    sa.Column('categoryid', sa.String(length=16), nullable=True),
    sa.Column('brandname', sa.String(length=100), nullable=True),
    sa.Column('img1', sa.String(length=200), nullable=True),
    sa.Column('childcid1', sa.String(length=16), nullable=True),
    sa.Column('productid1', sa.String(length=16), nullable=True),
    sa.Column('longname1', sa.String(length=100), nullable=True),
    sa.Column('price1', sa.String(length=10), nullable=True),
    sa.Column('marketprice1', sa.String(length=10), nullable=True),
    sa.Column('img2', sa.String(length=200), nullable=True),
    sa.Column('childcid2', sa.String(length=16), nullable=True),
    sa.Column('productid2', sa.String(length=16), nullable=True),
    sa.Column('longname2', sa.String(length=100), nullable=True),
    sa.Column('price2', sa.String(length=10), nullable=True),
    sa.Column('marketprice2', sa.String(length=10), nullable=True),
    sa.Column('img3', sa.String(length=200), nullable=True),
    sa.Column('childcid3', sa.String(length=16), nullable=True),
    sa.Column('productid3', sa.String(length=16), nullable=True),
    sa.Column('longname3', sa.String(length=100), nullable=True),
    sa.Column('price3', sa.String(length=10), nullable=True),
    sa.Column('marketprice3', sa.String(length=10), 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=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), 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=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), 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=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_usermodel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('username', sa.String(length=50), nullable=True),
    sa.Column('password', sa.String(length=256), nullable=True),
    sa.Column('email', sa.String(length=100), nullable=True),
    sa.Column('sex', sa.Boolean(), nullable=True),
    sa.Column('isdelete', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('axf_wheel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('img', sa.String(length=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_cartmodel',
    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_num', sa.Integer(), nullable=True),
    sa.Column('c_isselect', sa.Boolean(), nullable=True),
    sa.ForeignKeyConstraint(['c_goods'], ['axf_goods.id'], ),
    sa.ForeignKeyConstraint(['c_user'], ['axf_usermodel.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_ordermodel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('o_num', sa.String(length=64), nullable=True),
    sa.Column('o_user', sa.Integer(), nullable=True),
    sa.Column('o_status', sa.Integer(), nullable=True),
    sa.Column('o_datatime', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['o_user'], ['axf_usermodel.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_ordergoodsmodel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('og_order', sa.Integer(), nullable=True),
    sa.Column('og_num', sa.Integer(), nullable=True),
    sa.Column('og_goods', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['og_goods'], ['axf_goods.id'], ),
    sa.ForeignKeyConstraint(['og_order'], ['axf_ordermodel.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('axf_ordergoodsmodel')
    op.drop_table('axf_ordermodel')
    op.drop_table('axf_cartmodel')
    op.drop_table('axf_wheel')
    op.drop_table('axf_usermodel')
    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_foodtypes')
    # ### end Alembic commands ###

<filename>migrations/versions/f27106770efd_.py
"""empty message

Revision ID: f27106770efd
Revises: 
Create Date: 2018-09-03 17:00:56.514281

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('axf_foodtypes',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('typeid', sa.String(length=16), nullable=True),
    sa.Column('typename', sa.String(length=100), nullable=True),
    sa.Column('childtypenames', sa.String(length=200), 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.String(length=16), nullable=True),
    sa.Column('productimg', sa.String(length=200), nullable=True),
    sa.Column('productname', sa.String(length=100), nullable=True),
    sa.Column('productlongname', sa.String(length=200), nullable=True),
    sa.Column('isxf', sa.Integer(), nullable=True),
    sa.Column('pmdesc', sa.Integer(), nullable=True),
    sa.Column('specifics', sa.String(length=20), nullable=True),
    sa.Column('price', sa.Float(), nullable=True),
    sa.Column('marketprice', sa.Float(), nullable=True),
    sa.Column('categoryid', sa.String(length=16), nullable=True),
    sa.Column('childcid', sa.String(length=20), nullable=True),
    sa.Column('childcidname', sa.String(length=100), nullable=True),
    sa.Column('dealerid', sa.String(length=16), 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=200), nullable=True),
    sa.Column('name', sa.String(length=100), nullable=True),
    sa.Column('trackid', sa.String(length=50), nullable=True),
    sa.Column('categoryid', sa.String(length=16), nullable=True),
    sa.Column('brandname', sa.String(length=100), nullable=True),
    sa.Column('img1', sa.String(length=200), nullable=True),
    sa.Column('childcid1', sa.String(length=16), nullable=True),
    sa.Column('productid1', sa.String(length=16), nullable=True),
    sa.Column('longname1', sa.String(length=100), nullable=True),
    sa.Column('price1', sa.String(length=10), nullable=True),
    sa.Column('marketprice1', sa.String(length=10), nullable=True),
    sa.Column('img2', sa.String(length=200), nullable=True),
    sa.Column('childcid2', sa.String(length=16), nullable=True),
    sa.Column('productid2', sa.String(length=16), nullable=True),
    sa.Column('longname2', sa.String(length=100), nullable=True),
    sa.Column('price2', sa.String(length=10), nullable=True),
    sa.Column('marketprice2', sa.String(length=10), nullable=True),
    sa.Column('img3', sa.String(length=200), nullable=True),
    sa.Column('childcid3', sa.String(length=16), nullable=True),
    sa.Column('productid3', sa.String(length=16), nullable=True),
    sa.Column('longname3', sa.String(length=100), nullable=True),
    sa.Column('price3', sa.String(length=10), nullable=True),
    sa.Column('marketprice3', sa.String(length=10), 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=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), 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=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), 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=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_usermodel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('username', sa.String(length=50), nullable=True),
    sa.Column('password', sa.String(length=256), nullable=True),
    sa.Column('email', sa.String(length=100), nullable=True),
    sa.Column('sex', sa.Boolean(), nullable=True),
    sa.Column('isdelete', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('axf_wheel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('img', sa.String(length=225), nullable=True),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.Column('trackid', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_cartmodel',
    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_num', sa.Integer(), nullable=True),
    sa.Column('c_isselect', sa.Boolean(), nullable=True),
    sa.ForeignKeyConstraint(['c_goods'], ['axf_goods.id'], ),
    sa.ForeignKeyConstraint(['c_user'], ['axf_usermodel.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_ordermodel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('o_num', sa.String(length=64), nullable=True),
    sa.Column('o_user', sa.Integer(), nullable=True),
    sa.Column('o_status', sa.Integer(), nullable=True),
    sa.Column('o_datatime', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['o_user'], ['axf_usermodel.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('axf_ordergoodsmodel',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('og_order', sa.Integer(), nullable=True),
    sa.Column('og_num', sa.Integer(), nullable=True),
    sa.Column('og_goods', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['og_goods'], ['axf_goods.id'], ),
    sa.ForeignKeyConstraint(['og_order'], ['axf_ordermodel.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('axf_ordergoodsmodel')
    op.drop_table('axf_ordermodel')
    op.drop_table('axf_cartmodel')
    op.drop_table('axf_wheel')
    op.drop_table('axf_usermodel')
    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_foodtypes')
    # ### end Alembic commands ###

empty message  Revision ID: f27106770efd Revises:  Create Date: 2018-09-03 17:00:56.514281 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###