"""empty message

Revision ID: 93f86f4425ad
Revises: 1212226327bb
Create Date: 2020-02-13 19:17:30.502418

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "93f86f4425ad"
down_revision = "1212226327bb"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "action_promocode",
        sa.Column("campaign_id", sa.BigInteger(), nullable=False),
        sa.Column("promocode", sa.UnicodeText(), nullable=False),
        sa.ForeignKeyConstraint(
            ["campaign_id"],
            ["campaign.id"],
            name=op.f("fk_action_promocode_campaign_id_campaign"),
        ),
    )
    op.create_index(
        "action_promocode_campaign_id",
        "action_promocode",
        ["campaign_id"],
        unique=False,
        postgresql_using="hash",
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index("action_promocode_campaign_id", table_name="action_promocode")
    op.drop_table("action_promocode")
    # ### end Alembic commands ###
