Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4421 from willkg/1398200-remove-tables
fix bug 1398200, 1457484: remove unused tables
- Loading branch information
Showing
11 changed files
with
61 additions
and
502 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
alembic/versions/1e188109fc6b_bug_1398200_1457484_remove_plugins.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
"""bug 1398200, 1457484 remove unused tables | ||
Revision ID: 1e188109fc6b | ||
Revises: 8e8390138426 | ||
Create Date: 2018-04-27 14:12:16.709146 | ||
""" | ||
|
||
from alembic import op | ||
|
||
from socorro.lib.migrations import load_stored_proc | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '1e188109fc6b' | ||
down_revision = '8e8390138426' | ||
|
||
|
||
def upgrade(): | ||
# Bug 1398200 | ||
op.execute('DROP TABLE IF EXISTS plugins') | ||
|
||
# Bug 1457484 | ||
op.execute('DROP TABLE IF EXISTS release_channel_matches') | ||
op.execute('DROP TABLE IF EXISTS replication_test') | ||
op.execute('DROP TABLE IF EXISTS sessions') | ||
op.execute('DROP TABLE IF EXISTS socorro_db_version') | ||
op.execute('DROP TABLE IF EXISTS socorro_db_version_history') | ||
op.execute('DROP TABLE IF EXISTS transform_rules') | ||
op.execute('DROP TABLE IF EXISTS crashes_by_user') | ||
op.execute('DROP TABLE IF EXISTS crashes_by_user_build') | ||
op.execute('DROP TABLE IF EXISTS uptime_levels') | ||
op.execute('DROP TABLE IF EXISTS modules') | ||
op.execute('DROP TABLE IF EXISTS crash_types') | ||
op.execute('DROP TABLE IF EXISTS process_types') | ||
op.execute('DROP TABLE IF EXISTS rank_compare') | ||
|
||
op.execute('DROP FUNCTION IF EXISTS backfill_rank_compare(date)') | ||
op.execute('DROP FUNCTION IF EXISTS update_rank_compare(date, boolean, interval)') | ||
|
||
# Load the new version of backfill_matviews | ||
load_stored_proc(op, ['backfill_matviews.sql']) | ||
|
||
# Bug 1440474 | ||
op.execute('DROP TABLE IF EXISTS android_devices') | ||
|
||
op.execute('DROP FUNCTION IF EXISTS update_android_devices(date, boolean)') | ||
op.execute('DROP FUNCTION IF EXISTS backfill_android_devices(date)') | ||
|
||
|
||
def downgrade(): | ||
# There is no going back | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.