$result = $result && create_table($table);
}
- $table = new XMLDBTable('grade_items');
- $field = new XMLDBField('locktime');
-
- if (!field_exists($table, $field)) {
- $locktime->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'locked');
- /// Launch add field locktime
- $result = $result && add_field($table, $field);
- }
-
/// Remove the obsoleted unitttests tables - they will be recreated automatically
$tables = array('grade_categories',
'scale',
}
+ /// add new locktime field if needed
+ if ($result && $oldversion < 2007062008) {
+
+ $table = new XMLDBTable('grade_items');
+ $field = new XMLDBField('locktime');
+
+ if (!field_exists($table, $field)) {
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'locked');
+ /// Launch add field locktime
+ $result = $result && add_field($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 = 2007062007; // YYYYMMDD = date
+ $version = 2007062008; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.9 dev'; // Human-friendly version name