<FIELD NAME="expireref" TYPE="char" LENGTH="250" NOTNULL="false" DEFAULT="" SEQUENCE="false" ENUM="false" PREVIOUS="expiry" NEXT="created"/>
<FIELD NAME="created" TYPE="datetime" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="expireref" NEXT="modified"/>
<FIELD NAME="modified" TYPE="datetime" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="created" NEXT="sessdata"/>
- <FIELD NAME="sessdata" TYPE="text" LENGTH="big" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="modified"/>
+ <FIELD NAME="sessdata" TYPE="text" LENGTH="big" NOTNULL="false" DEFAULT="" SEQUENCE="false" ENUM="false" PREVIOUS="modified"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="sesskey" COMMENT="Primary key for sessions"/>
<FIELD NAME="calculation" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="Formula describing how to derive this grade from other items, referring to them using [idnumber] ... eg something like:sin(square([XXXXX])) + [YYYY]" PREVIOUS="itemid" NEXT="timecreated"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the time this calculation was first created" PREVIOUS="calculation" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the time this calculation was last modified" PREVIOUS="timecreated" NEXT="usermodified"/>
- <FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the userid of the person who last modified this calculation" PREVIOUS="timemodified"/>
+ <FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the userid of the person who last modified this calculation" PREVIOUS="timemodified"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table, please edit me" NEXT="itemid"/>
$result = $result && add_field($table, $field);
}
+ if ($result && $oldversion < 2007042601) {
+
+ /// Changing nullability of field usermodified on table grade_calculations to null
+ $table = new XMLDBTable('grade_calculations');
+ $field = new XMLDBField('usermodified');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null, 'timemodified');
+
+ /// Launch change of nullability for field usermodified
+ $result = $result && change_field_notnull($table, $field);
+ }
return $result;
}
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007042600; // YYYYMMDD = date
+ $version = 2007042601; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.9 dev'; // Human-friendly version name