From e4a5c864b5b3bb6359e3308edc98e068400a93da Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Tue, 2 Oct 2007 08:38:19 +0000 Subject: [PATCH] version bump: introducing cache_flags table to store volatile time-bound flags We are intending to use them for dirty context paths, lightweight session entries for auth/ldap, and other similar uses... MDL-11347 --- lib/db/install.xml | 20 ++++++++++++++++++-- lib/db/upgrade.php | 25 +++++++++++++++++++++++++ version.php | 2 +- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 4338e39d4f..07db7edca0 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 841c67c682..b33c07f1ef 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 9fda03bfe7..8ab6d8b861 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 -- 2.39.5