From 948bee191f1ac60942da07ce10c86fd60f20f396 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Wed, 10 Jan 2024 13:21:11 +0000 Subject: [PATCH] Revert "Make index not unique (#537)" This reverts commit c89c18f64124b78d3bb66e3f4a1fffec748bbfc2. I decided that since the code is written with the assumption that there is only one issue per person that I would revert this. If the logic changes I will change this to non-unique. --- db/install.xml | 2 +- db/upgrade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/install.xml b/db/install.xml index 9f7d3be1..0778a652 100644 --- a/db/install.xml +++ b/db/install.xml @@ -56,7 +56,7 @@ - + diff --git a/db/upgrade.php b/db/upgrade.php index 49a78d40..0341cee8 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -203,7 +203,7 @@ function xmldb_customcert_upgrade($oldversion) { if ($oldversion < 2022112802) { // Define index to be added to customcert_issues. $table = new xmldb_table('customcert_issues'); - $index = new xmldb_index('userid-customcertid', XMLDB_INDEX_NOTUNIQUE, ['userid', 'customcertid']); + $index = new xmldb_index('userid-customcertid', XMLDB_INDEX_UNIQUE, ['userid', 'customcertid']); // Conditionally launch add index. if (!$dbman->index_exists($table, $index)) {