"""add b2_images_interim table

Revision ID: 7d4b64c80a5c
Revises: <PASSWORD>
Create Date: 2020-02-22 13:24:34.196651

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "7d4b64c80a5c"
down_revision = "bacf2c228b0f"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "b2_images_interim",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("plugin", sa.Text(), nullable=False),
        sa.Column("url", sa.Text(), nullable=False),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_b2_images_interim")),
        sa.UniqueConstraint("url", name=op.f("uq_b2_images_interim_url")),
    )
    op.create_index(
        op.f("ix_b2_images_interim_plugin"),
        "b2_images_interim",
        ["plugin"],
        unique=False,
    )
    op.drop_table("nosacze")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "nosacze",
        sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
        sa.Column("url", sa.TEXT(), autoincrement=False, nullable=False),
        sa.PrimaryKeyConstraint("id", name="pk_nosacze"),
        sa.UniqueConstraint("url", name="uq_nosacze_url"),
    )
    op.drop_index(op.f("ix_b2_images_interim_plugin"), table_name="b2_images_interim")
    op.drop_table("b2_images_interim")
    # ### end Alembic commands ###

"""add b2_images_interim table

Revision ID: 7d4b64c80a5c
Revises: <PASSWORD>
Create Date: 2020-02-22 13:24:34.196651

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "7d4b64c80a5c"
down_revision = "bacf2c228b0f"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "b2_images_interim",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("plugin", sa.Text(), nullable=False),
        sa.Column("url", sa.Text(), nullable=False),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_b2_images_interim")),
        sa.UniqueConstraint("url", name=op.f("uq_b2_images_interim_url")),
    )
    op.create_index(
        op.f("ix_b2_images_interim_plugin"),
        "b2_images_interim",
        ["plugin"],
        unique=False,
    )
    op.drop_table("nosacze")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "nosacze",
        sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
        sa.Column("url", sa.TEXT(), autoincrement=False, nullable=False),
        sa.PrimaryKeyConstraint("id", name="pk_nosacze"),
        sa.UniqueConstraint("url", name="uq_nosacze_url"),
    )
    op.drop_index(op.f("ix_b2_images_interim_plugin"), table_name="b2_images_interim")
    op.drop_table("b2_images_interim")
    # ### end Alembic commands ###

add b2_images_interim table  Revision ID: 7d4b64c80a5c Revises: <PASSWORD> Create Date: 2020-02-22 13:24:34.196651 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###