-
Notifications
You must be signed in to change notification settings - Fork 218
/
1e188109fc6b_bug_1398200_1457484_remove_plugins.py
53 lines (38 loc) · 1.64 KB
/
1e188109fc6b_bug_1398200_1457484_remove_plugins.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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