"""empty message

Revision ID: 2c7e89f16d10
Revises: 73f22b6ac6af
Create Date: 2020-09-28 17:32:51.650601

"""
from alembic import op

# revision identifiers, used by Alembic.
revision = "2c7e89f16d10"
down_revision = "73f22b6ac6af"
branch_labels = None
depends_on = None


def upgrade():
    op.execute(
        """
        UPDATE campaign_direct_moderation SET reviewer_uid = 0 WHERE reviewer_uid IS NULL
        """
    )
    op.execute(
        """
        ALTER TABLE campaign_direct_moderation ALTER COLUMN reviewer_uid SET NOT NULL
        """
    )


def downgrade():
    op.execute(
        """
        ALTER TABLE campaign_direct_moderation ALTER COLUMN reviewer_uid DROP NOT NULL
        """
    )
