Skip to content

Commit

Permalink
Drop distribution table
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaclarke committed May 14, 2021
1 parent d096075 commit 71cda0a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions migrations/versions/1946eac73ac4_drop_distribution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""drop distribution
Revision ID: 1946eac73ac4
Revises: d91083587a7e
Create Date: 2021-05-14 09:05:29.915955
"""
from alembic import op
from sqlalchemy import MetaData


# revision identifiers, used by Alembic.
revision = "1946eac73ac4"
down_revision = "6da4b0d2ad27"
branch_labels = None
depends_on = None


def upgrade():
connection = op.get_bind()
meta = MetaData()
meta.reflect(bind=connection)
if "distribution" in meta.tables:
op.drop_index("distribution_sha_index", table_name="distribution")
op.drop_index("distribution_repository_index", table_name="distribution")
op.drop_index("distribution_machine_id_index", table_name="distribution")
op.drop_index("distribution_index", table_name="distribution")
op.drop_index("distribution_context_id_index", table_name="distribution")
op.drop_index("distribution_case_id_index", table_name="distribution")
op.drop_table("distribution")


def downgrade():
pass

0 comments on commit 71cda0a

Please sign in to comment.