mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-9506 Added timestamps to grade_categories
This commit is contained in:
parent
f9a09741c2
commit
db07a42eda
@ -1274,7 +1274,9 @@
|
||||
<FIELD NAME="aggregation" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="A constant pointing to one of the predefined aggregation strategies (none, mean,median,sum, etc)" PREVIOUS="fullname" NEXT="keephigh"/>
|
||||
<FIELD NAME="keephigh" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="Keep only the X highest items" PREVIOUS="aggregation" NEXT="droplow"/>
|
||||
<FIELD NAME="droplow" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="Drop the X lowest items" PREVIOUS="keephigh" NEXT="hidden"/>
|
||||
<FIELD NAME="hidden" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="1 is hidden, &gt; 1 is a date to hide until" PREVIOUS="droplow"/>
|
||||
<FIELD NAME="hidden" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="1 is hidden, &gt; 1 is a date to hide until" PREVIOUS="droplow" NEXT="timecreated"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="hidden" NEXT="timemodified"/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table, please edit me" NEXT="courseid"/>
|
||||
|
@ -1000,7 +1000,24 @@ function xmldb_main_upgrade($oldversion=0) {
|
||||
$result = $result && create_table($table);
|
||||
}
|
||||
|
||||
|
||||
if ($result && $oldversion < 2007042600) {
|
||||
|
||||
/// Define field timecreated to be added to grade_categories
|
||||
$table = new XMLDBTable('grade_categories');
|
||||
$field = new XMLDBField('timecreated');
|
||||
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null, 'hidden');
|
||||
|
||||
/// Launch add field timecreated
|
||||
$result = $result && add_field($table, $field);
|
||||
|
||||
/// Define field timemodified to be added to grade_categories
|
||||
$table = new XMLDBTable('grade_categories');
|
||||
$field = new XMLDBField('timemodified');
|
||||
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null, 'timecreated');
|
||||
|
||||
/// Launch add field timemodified
|
||||
$result = $result && add_field($table, $field);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user