Skip to content

Commit

Permalink
fixes bug 1394909 - correct order of table deletions with partitions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Bengtsson committed Sep 5, 2017
1 parent 2ba5e85 commit c185523
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion alembic/versions/07c6633fa1b6_delete_signature_summaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ def upgrade():
table_name, = records
all_table_names.append(table_name)

# Now delete all these massive tables
# Now delete all these massive tables.
# But make sure that we drop them in the "right" order.
# In particular we want to make sure we first drop
# 'signature_summary_os_20130603' *before* we drop 'signature_summary_os'
# since the former depends on the latter.
all_table_names.sort(reverse=True)
for table_name in all_table_names:
op.execute('DROP TABLE IF EXISTS {}'.format(table_name))

Expand Down

0 comments on commit c185523

Please sign in to comment.