"""v3.6: Add column retry_if_failed to periodictask

Revision ID: 59ef3e03bc62
Revises: 888b56ed5dcb
Create Date: 2021-04-28 11:14:27.181828

"""

# revision identifiers, used by Alembic.
revision = '59ef3e03bc62'
down_revision = '888b56ed5dcb'

from alembic import op
import sqlalchemy as sa


def upgrade():
    try:
        op.add_column('periodictask', sa.Column('retry_if_failed', sa.Boolean(), nullable=False,
                                                server_default=sa.true()))
    except Exception as exx:
        print("Could not add column 'retry_if_failed'")
        print(exx)


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('periodictask', 'retry_if_failed')
    # ### end Alembic commands ###
