MDL-13766, new field for repository table
This commit is contained in:
+2
-1
@@ -1703,6 +1703,7 @@
|
||||
<FIELD NAME="data5" TYPE="text" LENGTH="big" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="data4" NEXT="timecreated"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="data5" NEXT="timemodified"/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated"/>
|
||||
<FIELD NAME="visible" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
@@ -1878,4 +1879,4 @@
|
||||
</SENTENCES>
|
||||
</STATEMENT>
|
||||
</STATEMENTS>
|
||||
</XMLDB>
|
||||
</XMLDB>
|
||||
|
||||
@@ -610,6 +610,20 @@ function xmldb_main_upgrade($oldversion=0) {
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2008080600);
|
||||
}
|
||||
if ($result && $oldversion < 2008080701) {
|
||||
|
||||
/// Define field visible to be added to repository
|
||||
$table = new xmldb_table('repository');
|
||||
$field = new xmldb_field('visible', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, null, null, null, null, '1', 'timemodified');
|
||||
|
||||
/// Conditionally launch add field visible
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2008080701);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2008080600; // YYYYMMDD = date of the last version bump
|
||||
$version = 2008080701; // YYYYMMDD = date of the last version bump
|
||||
// XX = daily increments
|
||||
|
||||
$release = '2.0 dev (Build: 20080807)'; // Human-friendly version name
|
||||
|
||||
Reference in New Issue
Block a user