"""empty message

Revision ID: d6f1fb97420a
Revises: 
Create Date: 2018-06-29 21:47:59.178848

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Products',
    sa.Column('p_id', sa.Integer(), nullable=False),
    sa.Column('p_name', sa.String(), nullable=False),
    sa.Column('price', sa.Float(), nullable=False),
    sa.Column('accessory', sa.Boolean(), nullable=False),
    sa.PrimaryKeyConstraint('p_id')
    )
    op.create_table('User',
    sa.Column('u_id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(), nullable=False),
    sa.Column('username', sa.String(), nullable=False),
    sa.Column('email', sa.String(), nullable=False),
    sa.Column('password', sa.String(), nullable=False),
    sa.Column('verified', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('u_id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('Purchases',
    sa.Column('pu_id', sa.Integer(), nullable=False),
    sa.Column('u_id', sa.Integer(), nullable=False),
    sa.Column('p_id', sa.Integer(), nullable=False),
    sa.Column('date', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['p_id'], ['Products.p_id'], ),
    sa.ForeignKeyConstraint(['u_id'], ['User.u_id'], ),
    sa.PrimaryKeyConstraint('pu_id')
    )
    op.create_table('ShippingInfo',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('u_id', sa.Integer(), nullable=False),
    sa.Column('address', sa.String(), nullable=False),
    sa.Column('phone', sa.CHAR(length=10), nullable=False),
    sa.ForeignKeyConstraint(['u_id'], ['User.u_id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('Wishlist',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('u_id', sa.Integer(), nullable=False),
    sa.Column('p_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['p_id'], ['Products.p_id'], ),
    sa.ForeignKeyConstraint(['u_id'], ['User.u_id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('Wishlist')
    op.drop_table('ShippingInfo')
    op.drop_table('Purchases')
    op.drop_table('User')
    op.drop_table('Products')
    # ### end Alembic commands ###
