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; |
+""" |