From 2717b64523f03fb04bc198f6b26918ef6f6695da Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Thu, 19 Jul 2007 07:35:21 +0000 Subject: [PATCH] adding the grade_outcomes_courses table --- lib/db/install.xml | 16 ++++++++++++++-- lib/db/upgrade.php | 19 +++++++++++++++++++ version.php | 2 +- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 992d6d707b..cbefe57565 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1564,7 +1564,7 @@ - +
@@ -1580,6 +1580,18 @@
+ + + + + + + + + + + +
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index d66bc082fe..2c8f75bdb9 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1522,6 +1522,25 @@ function xmldb_main_upgrade($oldversion=0) { } + if ($result && $oldversion < 2007071900) { + + /// Define table grade_outcomes_courses to be created + $table = new XMLDBTable('grade_outcomes_courses'); + + /// Adding fields to table grade_outcomes_courses + $table->addFieldInfo('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null); + $table->addFieldInfo('courseid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null); + $table->addFieldInfo('outcomesid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null); + + /// Adding keys to table grade_outcomes_courses + $table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id')); + $table->addKeyInfo('courseid', XMLDB_KEY_FOREIGN, array('courseid'), 'course', array('id')); + $table->addKeyInfo('outcomesid', XMLDB_KEY_FOREIGN, array('outcomesid'), 'grade_outcomes', array('id')); + + /// Launch create table for grade_outcomes_courses + $result = $result && create_table($table); + } + return $result; } ?> diff --git a/version.php b/version.php index f149f08715..219960f297 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 = 2007071801; // YYYYMMDD = date + $version = 2007071900; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name -- 2.39.5