"""Permanentyly summarized flag

Revision ID: 1197d4b7ce86
Revises: 17077a9ff72a
Create Date: 2019-08-18 13:05:48.755947

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "1197d4b7ce86"
down_revision = "17077a9ff72a"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "poll",
        sa.Column(
            "permanently_summarized",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
    )
    op.alter_column(
        "poll",
        "summarize",
        existing_type=sa.BOOLEAN(),
        server_default=None,
        existing_nullable=False,
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "poll",
        "summarize",
        existing_type=sa.BOOLEAN(),
        server_default=sa.text("false"),
        existing_nullable=False,
    )
    op.drop_column("poll", "permanently_summarized")
    # ### end Alembic commands ###
