• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1def migrate_up(manager):
2    manager.execute_script(CREATE_INDICES)
3
4
5def migrate_down(manager):
6    manager.execute_script(DROP_INDICES)
7
8
9CREATE_INDICES = """
10CREATE INDEX job_idx ON tests (job_idx);
11CREATE INDEX reason ON tests (reason);
12CREATE INDEX test ON tests (test);
13CREATE INDEX subdir ON tests (subdir);
14CREATE INDEX printable ON kernels (printable);
15CREATE INDEX word ON status (word);
16CREATE INDEX attribute ON test_attributes (attribute);
17CREATE INDEX value ON test_attributes (value);
18CREATE INDEX attribute ON iteration_result (attribute);
19CREATE INDEX value ON iteration_result (value);
20"""
21
22
23DROP_INDICES = """
24DROP INDEX job_idx ON tests;
25DROP INDEX reason ON tests;
26DROP INDEX test ON tests;
27DROP INDEX subdir ON tests;
28DROP INDEX printable ON kernels;
29DROP INDEX word ON status;
30DROP INDEX attribute ON test_attributes;
31DROP INDEX value ON test_attributes;
32DROP INDEX attribute ON iteration_result;
33DROP INDEX value ON iteration_result;
34"""
35