1*9c5db199SXin Lidef migrate_up(manager): 2*9c5db199SXin Li raise Exception('The TKO database is no longer used. Please run migrate.py ' 3*9c5db199SXin Li 'without the -d or --database parameter') 4*9c5db199SXin Li 5*9c5db199SXin Li 6*9c5db199SXin Lidef migrate_down(manager): 7*9c5db199SXin Li manager.execute_script(DROP_DB_SQL) 8*9c5db199SXin Li 9*9c5db199SXin Li 10*9c5db199SXin LiDROP_DB_SQL = """\ 11*9c5db199SXin Li-- drop all views (since they depend on some or all of the following tables) 12*9c5db199SXin LiDROP VIEW IF EXISTS test_view; 13*9c5db199SXin LiDROP VIEW IF EXISTS perf_view; 14*9c5db199SXin Li 15*9c5db199SXin LiDROP TABLE IF EXISTS brrd_sync; 16*9c5db199SXin LiDROP TABLE IF EXISTS iteration_result; 17*9c5db199SXin LiDROP TABLE IF EXISTS test_attributes; 18*9c5db199SXin LiDROP TABLE IF EXISTS tests; 19*9c5db199SXin LiDROP TABLE IF EXISTS patches; 20*9c5db199SXin LiDROP TABLE IF EXISTS jobs; 21*9c5db199SXin LiDROP TABLE IF EXISTS machines; 22*9c5db199SXin LiDROP TABLE IF EXISTS kernels; 23*9c5db199SXin LiDROP TABLE IF EXISTS status; 24*9c5db199SXin Li""" 25