"""empty message

Revision ID: dfe454c0e970
Revises: 
Create Date: 2019-08-09 22:41:51.412416

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('fname', sa.String(length=60), nullable=False),
    sa.Column('lname', sa.String(length=60), nullable=False),
    sa.Column('username', sa.String(length=60), nullable=False),
    sa.Column('email', sa.String(length=120), nullable=False),
    sa.Column('image_file', sa.String(length=120), nullable=False),
    sa.Column('password', sa.String(length=60), nullable=False),
    sa.Column('designation', sa.String(length=60), nullable=True),
    sa.Column('company', sa.String(length=60), nullable=True),
    sa.Column('website', sa.String(length=60), nullable=True),
    sa.Column('description', sa.String(length=400), nullable=True),
    sa.Column('confirmed', sa.Boolean(), server_default='false', nullable=False),
    sa.Column('is_admin', sa.Boolean(), server_default='false', nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('id'),
    sa.UniqueConstraint('username')
    )
    op.create_table('review_section',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('section_id', sa.String(length=500), nullable=True),
    sa.Column('campaign_title', sa.String(length=60), server_default='Campaign', nullable=True),
    sa.Column('heading', sa.String(length=60), server_default='Reviews', nullable=False),
    sa.Column('placeholder', sa.String(length=400), server_default='ReviewIt here ....', nullable=False),
    sa.Column('label_1', sa.String(length=60), nullable=True),
    sa.Column('label_2', sa.String(length=60), nullable=True),
    sa.Column('label_3', sa.String(length=60), nullable=True),
    sa.Column('label_4', sa.String(length=60), nullable=True),
    sa.Column('label_5', sa.String(length=60), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('id'),
    sa.UniqueConstraint('section_id')
    )
    op.create_table('review',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('reviewer', sa.String(length=60), nullable=False),
    sa.Column('reviewer_email', sa.String(length=100), server_default='howdy@xyz.com', nullable=False),
    sa.Column('product_id', sa.String(length=600), server_default='Nothing', nullable=False),
    sa.Column('review_text', sa.String(length=400), nullable=False),
    sa.Column('date_posted', sa.DateTime(), nullable=False),
    sa.Column('upvotes', sa.Integer(), server_default='0', nullable=True),
    sa.Column('downvotes', sa.Integer(), server_default='0', nullable=True),
    sa.Column('label_1', sa.Integer(), server_default='0', nullable=True),
    sa.Column('label_2', sa.Integer(), server_default='0', nullable=True),
    sa.Column('label_3', sa.Integer(), server_default='0', nullable=True),
    sa.Column('label_4', sa.Integer(), server_default='0', nullable=True),
    sa.Column('label_5', sa.Integer(), server_default='0', nullable=True),
    sa.Column('status', sa.String(length=60), nullable=True),
    sa.Column('section_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['section_id'], ['review_section.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('review')
    op.drop_table('review_section')
    op.drop_table('user')
    # ### end Alembic commands ###
