"""empty message

Revision ID: 5ed256f782c6
Revises:
Create Date: 2019-12-10 13:28:08.407527

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "5ed256f782c6"
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "category_search_report",
        sa.Column("id", sa.BigInteger(), nullable=False),
        sa.Column("campaign_id", sa.BigInteger(), nullable=False),
        sa.Column("date", sa.Date(), nullable=False),
        sa.Column("routes", sa.BigInteger(), nullable=False),
        sa.Column("devices", sa.BigInteger(), nullable=False),
        sa.Column("pin_clicks", sa.BigInteger(), nullable=False),
        sa.Column("pin_shows", sa.BigInteger(), nullable=False),
        sa.Column("icon_clicks", sa.BigInteger(), nullable=False),
        sa.Column("icon_shows", sa.BigInteger(), nullable=False),
        sa.Column("created_at", sa.BigInteger(), nullable=False),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_category_search_report")),
    )
    op.create_index(
        "ix_campaign_ids",
        "category_search_report",
        ["campaign_id", "date"],
        unique=True,
    )
    # ### end Alembic commands ###


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