"""fix import

Revision ID: 265fdbf1f530
Revises: 466060f63b61
Create Date: 2021-02-20 11:30:45.116549

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '265fdbf1f530'
down_revision = '466060f63b61'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute('update cmf_kanban_status set orderno=0 where orderno is null')
    op.alter_column('cmf_kanban_status', 'orderno',
               existing_type=sa.INTEGER(),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_kanban_status', 'orderno',
               existing_type=sa.INTEGER(),
               nullable=True)
    # ### end Alembic commands ###
