"""Add order to colours table

Revision ID: c55992d1fe5f
Revises: a5aada49f2fc
Create Date: 2022-02-05 21:28:36.391312

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('notecolours', sa.Column('order', sa.Integer(), nullable=True))
    op.create_index(op.f('ix_notecolours_enabled'), 'notecolours', ['enabled'], unique=False)
    op.create_index(op.f('ix_notecolours_order'), 'notecolours', ['order'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_notecolours_order'), table_name='notecolours')
    op.drop_index(op.f('ix_notecolours_enabled'), table_name='notecolours')
    op.drop_column('notecolours', 'order')
    # ### end Alembic commands ###
