diff options
author | showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> | 2009-04-20 19:32:45 +0000 |
---|---|---|
committer | showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> | 2009-04-20 19:32:45 +0000 |
commit | 354976680410b84b5d903e71bca4aeef269a9391 (patch) | |
tree | ba1ada3e5d287f966efb85d8ab02edfb83e126db /tko/migrations | |
parent | 1d9a573dc45867a8523f53c1e3f659275a20a654 (diff) |
Index the test_id field on test_labels_tests. When people query with an exclusion of multiple labels, MySQL will want to use this index to join from tests to test_labels_tests on the test_idx.
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@3016 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/migrations')
-rw-r--r-- | tko/migrations/024_index_test_labels_tests_test_id.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tko/migrations/024_index_test_labels_tests_test_id.py b/tko/migrations/024_index_test_labels_tests_test_id.py new file mode 100644 index 00000000..2d3ef5ca --- /dev/null +++ b/tko/migrations/024_index_test_labels_tests_test_id.py @@ -0,0 +1,7 @@ +def migrate_up(manager): + manager.execute('CREATE INDEX test_labels_tests_test_id ' + 'ON test_labels_tests (test_id)') + + +def migrate_down(manager): + manager.execute('DROP INDEX test_labels_tests_test_id ON test_labels_tests') |