commit | d8220fa92c8777d84f51f0eed55ae7827a6120c4 | [log] [tgz] |
---|---|---|
author | Dan Shi <[email protected]> | Thu Feb 02 13:28:19 2017 -0800 |
committer | chrome-bot <[email protected]> | Fri Feb 03 05:15:07 2017 -0800 |
tree | 159946a628e49c08b8804c63f20f58a50b6fe89c | |
parent | 8f8524dd50b26463435d0431c2913ab00f111575 [diff] |
[autotest] Update TKO db schema 1. Add index for tko_tests.finished_time 2. Update tko_test_attributes id key to bigint. BUG=chromium:617703 TEST=local run migrate.py sync Change-Id: I9167f2fcea2a99ac2bf6e9757e1d05b1fbe67104 Reviewed-on: https://chromium-review.googlesource.com/436485 Commit-Ready: Dan Shi <[email protected]> Tested-by: Dan Shi <[email protected]> Reviewed-by: Prathmesh Prabhu <[email protected]>
diff --git a/frontend/migrations/108_index_tko_tests_finished_time.py b/frontend/migrations/108_index_tko_tests_finished_time.py new file mode 100644 index 0000000..5360a8c --- /dev/null +++ b/frontend/migrations/108_index_tko_tests_finished_time.py
@@ -0,0 +1,7 @@ +UP_SQL = """ +CREATE INDEX finished_time_idx ON tko_tests (finished_time); +""" + +DOWN_SQL = """ +DROP INDEX finished_time_idx ON tko_tests; +"""
diff --git a/frontend/migrations/109_change_tko_test_attributes_id_data_type.py b/frontend/migrations/109_change_tko_test_attributes_id_data_type.py new file mode 100644 index 0000000..38a5b79 --- /dev/null +++ b/frontend/migrations/109_change_tko_test_attributes_id_data_type.py
@@ -0,0 +1,7 @@ +UP_SQL = """ +ALTER TABLE tko_test_attributes MODIFY id bigint(20) AUTO_INCREMENT; +""" + +DOWN_SQL = """ +ALTER TABLE tko_test_attributes MODIFY id int(11) AUTO_INCREMENT; +"""