From 348c350b98686e80aa4babc7dbb92a7433415ed6 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Thu, 7 Aug 2008 07:48:14 +0000 Subject: [PATCH] MDL-13766, new field for repository table --- lib/db/install.xml | 3 ++- lib/db/upgrade.php | 14 ++++++++++++++ version.php | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 82849ca627..f3b6714e36 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1703,6 +1703,7 @@ + @@ -1878,4 +1879,4 @@ - \ No newline at end of file + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index cf219adcef..0d6694d8ef 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -610,6 +610,20 @@ function xmldb_main_upgrade($oldversion=0) { /// Main savepoint reached upgrade_main_savepoint($result, 2008080600); } + if ($result && $oldversion < 2008080701) { + + /// Define field visible to be added to repository + $table = new xmldb_table('repository'); + $field = new xmldb_field('visible', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, null, null, null, null, '1', 'timemodified'); + + /// Conditionally launch add field visible + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + /// Main savepoint reached + upgrade_main_savepoint($result, 2008080701); + } return $result; } diff --git a/version.php b/version.php index 0ad46ce0fa..bcc1213d6b 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 = 2008080600; // YYYYMMDD = date of the last version bump + $version = 2008080701; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 dev (Build: 20080807)'; // Human-friendly version name -- 2.39.5