"""empty message

Revision ID: 0a463754c386
Revises: fa051dbebf79
Create Date: 2019-10-08 16:19:46.354696

"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "0a463754c386"
down_revision = "fa051dbebf79"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "creative_logo_and_text",
        sa.Column("campaign_id", sa.BigInteger(), nullable=False),
        sa.Column("images", postgresql.JSONB(astext_type=sa.Text()), nullable=False),
        sa.Column("text", sa.UnicodeText(), nullable=False),
        sa.CheckConstraint(
            "jsonb_typeof(images) = 'array'",
            name=op.f("ck_creative_logo_and_text_images_jsonb_array"),
        ),
        sa.ForeignKeyConstraint(
            ["campaign_id"],
            ["campaign.id"],
            name=op.f("fk_creative_logo_and_text_campaign_id_campaign"),
        ),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("creative_logo_and_text")
    # ### end Alembic commands ###
