From 8a88bce5acc40cb13af3d9e3817828a039c70445 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 31 Jan 2007 18:40:14 +0000 Subject: [PATCH] Changing nullability of field response on table lesson_answers to null. Versions in 17_STABLE are the same, so no problems. MDL-8351 Merged from MOODLE_17_STABLE --- mod/lesson/db/install.xml | 9 ++++++--- mod/lesson/db/upgrade.php | 17 +++++++++-------- mod/lesson/version.php | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/mod/lesson/db/install.xml b/mod/lesson/db/install.xml index f19a3573b2..da6c545b6d 100644 --- a/mod/lesson/db/install.xml +++ b/mod/lesson/db/install.xml @@ -1,5 +1,8 @@ - + @@ -83,7 +86,7 @@ - + @@ -231,4 +234,4 @@ - + \ No newline at end of file diff --git a/mod/lesson/db/upgrade.php b/mod/lesson/db/upgrade.php index efaf7f151c..3de3838d73 100644 --- a/mod/lesson/db/upgrade.php +++ b/mod/lesson/db/upgrade.php @@ -23,14 +23,15 @@ function xmldb_lesson_upgrade($oldversion=0) { $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete -/// this comment lines once this file start handling proper -/// upgrade code. - -/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php -/// $result = result of "/lib/ddllib.php" function calls -/// } + if ($result && $oldversion < 2006091802) { + + /// Changing nullability of field response on table lesson_answers to null + $table = new XMLDBTable('lesson_answers'); + $field = new XMLDBField('response'); + $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'answer'); + + /// Launch change of nullability for field response + $result = $result && change_field_notnull($table, $field); return $result; } diff --git a/mod/lesson/version.php b/mod/lesson/version.php index 8041ba59d4..1fc5fc29ed 100644 --- a/mod/lesson/version.php +++ b/mod/lesson/version.php @@ -8,7 +8,7 @@ * @package lesson **/ -$module->version = 2006091801; // The current module version (Date: YYYYMMDDXX) +$module->version = 2006091802; // The current module version (Date: YYYYMMDDXX) $module->requires = 2006080900; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs) -- 2.39.5