diff --git a/lib/db/install.xml b/lib/db/install.xml index 4338e39d4fb..07db7edca05 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1688,7 +1688,7 @@ - +
@@ -1702,6 +1702,22 @@
+ + + + + + + + + + + + + + + +
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 841c67c6825..b33c07f1efa 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2256,6 +2256,31 @@ function xmldb_main_upgrade($oldversion=0) { } } + if ($result && $oldversion < 2007100100) { + + + /// Define table cache_flags to be created + $table = new XMLDBTable('cache_flags'); + + /// Adding fields to table cache_flags + $table->addFieldInfo('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null); + $table->addFieldInfo('flagtype', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, null); + $table->addFieldInfo('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, null); + $table->addFieldInfo('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0'); + $table->addFieldInfo('value', XMLDB_TYPE_TEXT, 'medium', null, XMLDB_NOTNULL, null, null, null, null); + $table->addFieldInfo('expiry', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null); + + /// Adding keys to table cache_flags + $table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id')); + + /// Adding indexes to table cache_flags + $table->addIndexInfo('typename', XMLDB_INDEX_UNIQUE, array('flagtype', 'name')); + + /// Launch create table for cache_flags + $result = $result && create_table($table); + } + + /* /// drop old gradebook tables if ($result && $oldversion < xxxxxxxx) { diff --git a/version.php b/version.php index 9fda03bfe75..8ab6d8b8617 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 = 2007092807; // YYYYMMDD = date + $version = 2007100100; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 Beta +'; // Human-friendly version name