<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="lib/db" VERSION="20070801" COMMENT="XMLDB file for core Moodle tables"
+<XMLDB PATH="lib/db" VERSION="20070802" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for tag_instance"/>
</KEYS>
<INDEXES>
- <INDEX NAME="tagiditem" UNIQUE="false" FIELDS="tagid, itemtype, itemid"/>
+ <INDEX NAME="tagiditem" UNIQUE="true" FIELDS="tagid, itemtype, itemid"/>
</INDEXES>
</TABLE>
</TABLES>
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) {
// 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