mbligh | 5456c2b | 2008-02-15 18:42:55 +0000 | [diff] [blame] | 1 | def migrate_up(manager): |
jamesren | 92afa56 | 2010-03-23 00:19:26 +0000 | [diff] [blame] | 2 | raise Exception('The TKO database is no longer used. Please run migrate.py ' |
| 3 | 'without the -d or --database parameter') |
mbligh | 5456c2b | 2008-02-15 18:42:55 +0000 | [diff] [blame] | 4 | |
| 5 | |
mbligh | aa383b7 | 2008-03-12 20:11:56 +0000 | [diff] [blame] | 6 | def migrate_down(manager): |
jadmanski | 0afbb63 | 2008-06-06 21:10:57 +0000 | [diff] [blame] | 7 | manager.execute_script(DROP_DB_SQL) |
mbligh | aa383b7 | 2008-03-12 20:11:56 +0000 | [diff] [blame] | 8 | |
| 9 | |
| 10 | DROP_DB_SQL = """\ |
mbligh | 5456c2b | 2008-02-15 18:42:55 +0000 | [diff] [blame] | 11 | -- drop all views (since they depend on some or all of the following tables) |
| 12 | DROP VIEW IF EXISTS test_view; |
| 13 | DROP VIEW IF EXISTS perf_view; |
| 14 | |
| 15 | DROP TABLE IF EXISTS brrd_sync; |
| 16 | DROP TABLE IF EXISTS iteration_result; |
| 17 | DROP TABLE IF EXISTS test_attributes; |
| 18 | DROP TABLE IF EXISTS tests; |
| 19 | DROP TABLE IF EXISTS patches; |
| 20 | DROP TABLE IF EXISTS jobs; |
| 21 | DROP TABLE IF EXISTS machines; |
| 22 | DROP TABLE IF EXISTS kernels; |
| 23 | DROP TABLE IF EXISTS status; |
mbligh | aa383b7 | 2008-03-12 20:11:56 +0000 | [diff] [blame] | 24 | """ |