"""add price table

Revision ID: 388aa87531a1
Revises: b2c7750ff271
Create Date: 2017-05-29 22:28:05.636133

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '388aa87531a1'
down_revision = 'b2c7750ff271'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('price',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('app_db_id', sa.Integer(), nullable=True),
    sa.Column('price', sa.Float(), nullable=True),
    sa.Column('discount', sa.Float(), nullable=True),
    sa.Column('price_original', sa.Float(), nullable=True),
    sa.Column('currency', sa.String(length=5), nullable=True),
    sa.ForeignKeyConstraint(['app_db_id'], ['app.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.add_column('app', sa.Column('description', sa.String(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('app', 'description')
    op.drop_table('price')
    # ### end Alembic commands ###
