Skip to content
Permalink
Browse files

Changing nullability of field response on table lesson_answers to null.

Versions in 17_STABLE are the same, so no problems. MDL-8351
  • Loading branch information...
stronk7
stronk7 committed Jan 31, 2007
1 parent 877d109 commit 509b0c983d8fc4c95e5e831bd3dd3ea865a4a221
Showing with 16 additions and 12 deletions.
  1. +6 −3 mod/lesson/db/install.xml
  2. +9 −8 mod/lesson/db/upgrade.php
  3. +1 −1 mod/lesson/version.php
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/lesson/db" VERSION="20060811" COMMENT="XMLDB file for Moodle mod/lesson">
<XMLDB PATH="mod/lesson/db" VERSION="20070131" COMMENT="XMLDB file for Moodle mod/lesson"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="lesson" COMMENT="Defines lesson" NEXT="lesson_pages">
<FIELDS>
@@ -83,7 +86,7 @@
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="flags" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated" NEXT="answer"/>
<FIELD NAME="answer" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="response"/>
<FIELD NAME="response" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="answer"/>
<FIELD NAME="response" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="answer"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for lesson_answers" NEXT="lessonid"/>
@@ -231,4 +234,4 @@
</SENTENCES>
</STATEMENT>
</STATEMENTS>
</XMLDB>
</XMLDB>
@@ -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;
}
@@ -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)

0 comments on commit 509b0c9

Please sign in to comment.
You can’t perform that action at this time.