"""delete slack_app_home_opened table

Revision ID: 21e8f6f7a837
Revises: <PASSWORD>
Create Date: 2020-07-05 23:36:02.735676

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

# revision identifiers, used by Alembic.
revision = "21e8f6f7a837"
down_revision = "44515a4bff4d"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(
        "ix_slack_app_home_opened_installation_id", table_name="slack_app_home_opened"
    )
    op.drop_index(
        "ix_slack_app_home_opened_slack_id", table_name="slack_app_home_opened"
    )
    op.drop_table("slack_app_home_opened")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "slack_app_home_opened",
        sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
        sa.Column(
            "date_created", postgresql.TIMESTAMP(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "date_modified", postgresql.TIMESTAMP(), autoincrement=False, nullable=True
        ),
        sa.Column("installation_id", sa.INTEGER(), autoincrement=False, nullable=False),
        sa.Column(
            "slack_id", sa.VARCHAR(length=30), autoincrement=False, nullable=False
        ),
        sa.Column("count", sa.INTEGER(), autoincrement=False, nullable=False),
        sa.ForeignKeyConstraint(
            ["installation_id"], ["slack_installation.id"], name="fk_installation_id"
        ),
        sa.PrimaryKeyConstraint("id", name="slack_app_home_opened_pkey"),
    )
    op.create_index(
        "ix_slack_app_home_opened_slack_id",
        "slack_app_home_opened",
        ["slack_id"],
        unique=False,
    )
    op.create_index(
        "ix_slack_app_home_opened_installation_id",
        "slack_app_home_opened",
        ["installation_id"],
        unique=False,
    )
    # ### end Alembic commands ###

"""delete slack_app_home_opened table

Revision ID: 21e8f6f7a837
Revises: <PASSWORD>
Create Date: 2020-07-05 23:36:02.735676

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

# revision identifiers, used by Alembic.
revision = "21e8f6f7a837"
down_revision = "44515a4bff4d"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(
        "ix_slack_app_home_opened_installation_id", table_name="slack_app_home_opened"
    )
    op.drop_index(
        "ix_slack_app_home_opened_slack_id", table_name="slack_app_home_opened"
    )
    op.drop_table("slack_app_home_opened")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "slack_app_home_opened",
        sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
        sa.Column(
            "date_created", postgresql.TIMESTAMP(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "date_modified", postgresql.TIMESTAMP(), autoincrement=False, nullable=True
        ),
        sa.Column("installation_id", sa.INTEGER(), autoincrement=False, nullable=False),
        sa.Column(
            "slack_id", sa.VARCHAR(length=30), autoincrement=False, nullable=False
        ),
        sa.Column("count", sa.INTEGER(), autoincrement=False, nullable=False),
        sa.ForeignKeyConstraint(
            ["installation_id"], ["slack_installation.id"], name="fk_installation_id"
        ),
        sa.PrimaryKeyConstraint("id", name="slack_app_home_opened_pkey"),
    )
    op.create_index(
        "ix_slack_app_home_opened_slack_id",
        "slack_app_home_opened",
        ["slack_id"],
        unique=False,
    )
    op.create_index(
        "ix_slack_app_home_opened_installation_id",
        "slack_app_home_opened",
        ["installation_id"],
        unique=False,
    )
    # ### end Alembic commands ###

delete slack_app_home_opened table  Revision ID: 21e8f6f7a837 Revises: <PASSWORD> Create Date: 2020-07-05 23:36:02.735676 # 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 ###