Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: frontend/migrations/055_ensure_invalidated_test_label_exists.py

Issue 1595019: Merge remote branch 'origin/upstream' into tempbranch (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frontend/client/src/autotest/tko/TkoUtils.java ('k') | frontend/migrations/056_planner_global_support.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frontend/migrations/055_ensure_invalidated_test_label_exists.py
diff --git a/frontend/migrations/055_ensure_invalidated_test_label_exists.py b/frontend/migrations/055_ensure_invalidated_test_label_exists.py
new file mode 100644
index 0000000000000000000000000000000000000000..05d3210f2491c5cb73c63e7b5f0d1900ddeaeb8c
--- /dev/null
+++ b/frontend/migrations/055_ensure_invalidated_test_label_exists.py
@@ -0,0 +1,13 @@
+UP_SQL = """
+ALTER TABLE tko_test_labels
+ADD CONSTRAINT tko_test_labels_unique
+UNIQUE INDEX (name);
+
+INSERT IGNORE INTO tko_test_labels (name, description)
+VALUES ('invalidated', '');
+"""
+
+DOWN_SQL = """
+ALTER TABLE tko_test_labels
+DROP INDEX tko_test_labels_unique;
+"""
« no previous file with comments | « frontend/client/src/autotest/tko/TkoUtils.java ('k') | frontend/migrations/056_planner_global_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698