"""empty message

Revision ID: c35d26e1bfa7
Revises: 
Create Date: 2019-05-02 12:36:16.646167

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('client',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_client_name'), 'client', ['name'], unique=True)
    op.create_table('product_area',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_product_area_name'), 'product_area', ['name'], unique=True)
    op.create_table('feature',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=50), nullable=True),
    sa.Column('description', sa.String(length=300), nullable=True),
    sa.Column('client_priority', sa.Integer(), nullable=True),
    sa.Column('client_id', sa.Integer(), nullable=True),
    sa.Column('product_area_id', sa.Integer(), nullable=False),
    sa.Column('target_date', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['client_id'], ['client.id'], ),
    sa.ForeignKeyConstraint(['product_area_id'], ['product_area.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_feature_title'), 'feature', ['title'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_feature_title'), table_name='feature')
    op.drop_table('feature')
    op.drop_index(op.f('ix_product_area_name'), table_name='product_area')
    op.drop_table('product_area')
    op.drop_index(op.f('ix_client_name'), table_name='client')
    op.drop_table('client')
    # ### end Alembic commands ###
