← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:uuid-db-column-unique-constraint into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:uuid-db-column-unique-constraint into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/465069
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:uuid-db-column-unique-constraint into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/helpers/utils.py b/charms/focal/autopkgtest-web/webcontrol/helpers/utils.py
index 4e26eb8..11b9774 100644
--- a/charms/focal/autopkgtest-web/webcontrol/helpers/utils.py
+++ b/charms/focal/autopkgtest-web/webcontrol/helpers/utils.py
@@ -123,7 +123,7 @@ def init_db(path, **kwargs):
             "  exitcode INTEGER, "
             "  requester TEXT, "
             "  env TEXT, "
-            "  uuid TEXT,  "
+            "  uuid TEXT UNIQUE,  "
             "  PRIMARY KEY(test_id, run_id), "
             "  FOREIGN KEY(test_id) REFERENCES test(id))"
         )