mbligh | fdebd22 | 2008-10-21 16:26:47 +0000 | [diff] [blame] | 1 | def migrate_up(manager): |
| 2 | manager.execute_script(CREATE_INDICES) |
| 3 | |
| 4 | |
| 5 | def migrate_down(manager): |
| 6 | manager.execute_script(DROP_INDICES) |
| 7 | |
| 8 | |
| 9 | CREATE_INDICES = """ |
| 10 | CREATE INDEX job_idx ON tests (job_idx); |
| 11 | CREATE INDEX reason ON tests (reason); |
| 12 | CREATE INDEX test ON tests (test); |
| 13 | CREATE INDEX subdir ON tests (subdir); |
| 14 | CREATE INDEX printable ON kernels (printable); |
| 15 | CREATE INDEX word ON status (word); |
| 16 | CREATE INDEX attribute ON test_attributes (attribute); |
| 17 | CREATE INDEX value ON test_attributes (value); |
| 18 | CREATE INDEX attribute ON iteration_result (attribute); |
| 19 | CREATE INDEX value ON iteration_result (value); |
| 20 | """ |
| 21 | |
| 22 | |
| 23 | DROP_INDICES = """ |
| 24 | DROP INDEX job_idx ON tests; |
| 25 | DROP INDEX reason ON tests; |
| 26 | DROP INDEX test ON tests; |
| 27 | DROP INDEX subdir ON tests; |
| 28 | DROP INDEX printable ON kernels; |
| 29 | DROP INDEX word ON status; |
| 30 | DROP INDEX attribute ON test_attributes; |
| 31 | DROP INDEX value ON test_attributes; |
| 32 | DROP INDEX attribute ON iteration_result; |
| 33 | DROP INDEX value ON iteration_result; |
| 34 | """ |