mnet MDL-21473 add plugintype&name fields to new mnet_remote_rpc table
This commit is contained in:
+4
-2
@@ -1345,7 +1345,9 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="functionname"/>
|
||||
<FIELD NAME="functionname" TYPE="char" LENGTH="40" NOTNULL="true" SEQUENCE="false" PREVIOUS="id" NEXT="xmlrpcpath"/>
|
||||
<FIELD NAME="xmlrpcpath" TYPE="char" LENGTH="80" NOTNULL="true" SEQUENCE="false" PREVIOUS="functionname"/>
|
||||
<FIELD NAME="xmlrpcpath" TYPE="char" LENGTH="80" NOTNULL="true" SEQUENCE="false" PREVIOUS="functionname" NEXT="plugintype"/>
|
||||
<FIELD NAME="plugintype" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" PREVIOUS="xmlrpcpath" NEXT="pluginname"/>
|
||||
<FIELD NAME="pluginname" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" PREVIOUS="plugintype"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
@@ -2388,4 +2390,4 @@
|
||||
</KEYS>
|
||||
</TABLE>
|
||||
</TABLES>
|
||||
</XMLDB>
|
||||
</XMLDB>
|
||||
@@ -2961,6 +2961,30 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2010012900);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2010012901) {
|
||||
|
||||
/// Define field plugintype to be added to mnet_remote_rpc
|
||||
$table = new xmldb_table('mnet_remote_rpc');
|
||||
$field = new xmldb_field('plugintype', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, 'xmlrpcpath');
|
||||
|
||||
/// Conditionally launch add field plugintype
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2010012901);
|
||||
|
||||
/// Define field pluginname to be added to mnet_remote_rpc
|
||||
$field = new xmldb_field('pluginname', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, 'plugintype');
|
||||
|
||||
/// Conditionally launch add field pluginname
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
}
|
||||
|
||||
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 = 2010012900; // YYYYMMDD = date of the last version bump
|
||||
$version = 2010012901; // YYYYMMDD = date of the last version bump
|
||||
// XX = daily increments
|
||||
|
||||
$release = '2.0 dev (Build: 20100129)'; // Human-friendly version name
|
||||
|
||||
Reference in New Issue
Block a user