Added field for studyplan description format to support rich editor
This commit is contained in:
parent
bcc3cb5a2c
commit
2a642f33c8
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="local/treestudyplan/db" VERSION="20230821" COMMENT="XMLDB file for Moodle local/treestudyplan"
|
||||
<XMLDB PATH="local/treestudyplan/db" VERSION="20231019" COMMENT="XMLDB file for Moodle local/treestudyplan"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
|
@ -27,6 +27,7 @@
|
|||
<FIELD NAME="name" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="shortname" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="description" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="descriptionformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="idnumber" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="aggregation" TYPE="char" LENGTH="30" NOTNULL="true" DEFAULT="bistate" SEQUENCE="false"/>
|
||||
<FIELD NAME="aggregation_config" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
|
|
|
@ -493,5 +493,20 @@ function xmldb_local_treestudyplan_upgrade($oldversion) {
|
|||
upgrade_plugin_savepoint(true, 2023082100, 'local', 'treestudyplan');
|
||||
}
|
||||
|
||||
if ($oldversion < 2023101900) {
|
||||
|
||||
// Define field descriptionformat to be added to local_treestudyplan.
|
||||
$table = new xmldb_table('local_treestudyplan');
|
||||
$field = new xmldb_field('descriptionformat', XMLDB_TYPE_INTEGER, '4', null, XMLDB_NOTNULL, null, '0', 'description');
|
||||
|
||||
// Conditionally launch add field descriptionformat.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Treestudyplan savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2023101900, 'local', 'treestudyplan');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user