diff --git a/lib/db/install.xml b/lib/db/install.xml
index 74912574010..e20750b92fd 100644
--- a/lib/db/install.xml
+++ b/lib/db/install.xml
@@ -846,14 +846,18 @@
-
+
+
+
-
+
+
+
@@ -1673,4 +1677,4 @@
-
\ No newline at end of file
+
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php
index eff9fa55a25..adf1441f5a8 100644
--- a/lib/db/upgrade.php
+++ b/lib/db/upgrade.php
@@ -1634,6 +1634,24 @@ function xmldb_main_upgrade($oldversion=0) {
$result = $result && change_field_precision($table, $field);
}
+ if ($result && $oldversion < 2007080900) {
+ /// Add context.path & index
+ $table = new XMLDBTable('context');
+ $field = new XMLDBField('path');
+ $field->setAttributes(XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, '', 'instanceid');
+ $result = $result && add_field($table, $field);
+ $table = new XMLDBTable('context');
+ $index = new XMLDBIndex('path');
+ $index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('path'));
+ $result = $result && add_index($table, $index);
+
+ /// Add context.depth
+ $table = new XMLDBTable('context');
+ $field = new XMLDBField('depth');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'path');
+ $result = $result && add_field($table, $field);
+ }
+
/*
/// drop old gradebook tables
if ($result && $oldversion < 2007072209) {
diff --git a/version.php b/version.php
index 8295a41df79..8dc1e648f68 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 = 2007080800; // YYYYMMDD = date
+ $version = 2007080900; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.9 dev'; // Human-friendly version name