diff --git a/lib/db/install.xml b/lib/db/install.xml index aa743914b76..74912574010 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1641,7 +1641,7 @@ - + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index c1cdc593882..02047847e5d 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1578,6 +1578,24 @@ function xmldb_main_upgrade($oldversion=0) { build_context_rel(); } + if ($result && $oldversion < 2007080201) { + + /// Define index tagiditem (not unique) to be dropped form tag_instance + $table = new XMLDBTable('tag_instance'); + $index = new XMLDBIndex('tagiditem'); + + /// Launch drop index tagiditem + drop_index($table, $index); + + /// Define index tagiditem (unique) to be added to tag_instance + $index->setAttributes(XMLDB_INDEX_UNIQUE, array('tagid', 'itemtype', 'itemid')); + + /// Launch add index tagiditem + $result = $result && add_index($table, $index); + + } + + /* /// drop old gradebook tables if ($result && $oldversion < 2007072209) { diff --git a/version.php b/version.php index 8959b2defb7..7fc6b4980cc 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2007080200; // YYYYMMDD = date + $version = 2007080201; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name