"""empty message

Revision ID: 05dc7ea062aa
Revises: 66dc0ae05abe
Create Date: 2021-01-19 15:03:45.698211

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '05dc7ea062aa'
down_revision = '66dc0ae05abe'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_chat_group', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_chat_topic', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.execute("update cmf_company set priority='0'")
    op.alter_column('cmf_company', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_deal', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_document', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_invoice', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_lead', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_list', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_payment', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_pipeline', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_purchase_order', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_purchase_order_items', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_sales_order', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_stock_move', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_stock_move_items', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_task', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    op.alter_column('cmf_u_work_post', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_u_work_post', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_task', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_stock_move_items', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_stock_move', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_sales_order', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_purchase_order_items', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_purchase_order', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_pipeline', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_payment', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_list', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_lead', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_invoice', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_document', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_deal', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_company', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_chat_topic', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    op.alter_column('cmf_chat_group', 'priority',
               existing_type=sa.VARCHAR(length=32),
               nullable=True)
    # ### end Alembic commands ###
