"""add_delivery_infos_to_tracking_info

Revision ID: fe424f6b86a5
Revises: c6fb90a99137
Create Date: 2017-03-25 10:16:07.411587

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('tracking_info', sa.Column('delivery_infos', sa.JSON(), nullable=True))
    op.drop_column('tracking_info', 'delivery_man_name')
    op.drop_column('tracking_info', 'logistics_company')
    op.drop_column('tracking_info', 'delivery_plate_no')
    op.drop_column('tracking_info', 'delivery_man_tel')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('tracking_info', sa.Column('delivery_man_tel', sa.VARCHAR(length=30), autoincrement=False, nullable=True))
    op.add_column('tracking_info', sa.Column('delivery_plate_no', sa.VARCHAR(length=100), autoincrement=False, nullable=True))
    op.add_column('tracking_info', sa.Column('logistics_company', sa.VARCHAR(length=200), autoincrement=False, nullable=True))
    op.add_column('tracking_info', sa.Column('delivery_man_name', sa.VARCHAR(length=200), autoincrement=False, nullable=True))
    op.drop_column('tracking_info', 'delivery_infos')
    # ### end Alembic commands ###
