mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'MDL-69572-Master' of https://github.com/tuanngocnguyen/moodle
This commit is contained in:
commit
b39c286ea4
3 changed files with 17 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<XMLDB PATH="mod/book/db" VERSION="20120515" COMMENT="XMLDB file for Moodle mod_book"
|
<XMLDB PATH="mod/book/db" VERSION="20200907" COMMENT="XMLDB file for Moodle mod_book"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||||
>
|
>
|
||||||
|
@ -39,6 +39,9 @@
|
||||||
<KEYS>
|
<KEYS>
|
||||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||||
</KEYS>
|
</KEYS>
|
||||||
|
<INDEXES>
|
||||||
|
<INDEX NAME="bookid" UNIQUE="false" FIELDS="bookid"/>
|
||||||
|
</INDEXES>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</TABLES>
|
</TABLES>
|
||||||
</XMLDB>
|
</XMLDB>
|
||||||
|
|
|
@ -30,7 +30,9 @@ defined('MOODLE_INTERNAL') || die;
|
||||||
* @return bool always true
|
* @return bool always true
|
||||||
*/
|
*/
|
||||||
function xmldb_book_upgrade($oldversion) {
|
function xmldb_book_upgrade($oldversion) {
|
||||||
global $CFG;
|
global $CFG, $DB;
|
||||||
|
|
||||||
|
$dbman = $DB->get_manager();
|
||||||
|
|
||||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||||
// Put any upgrade step following this.
|
// Put any upgrade step following this.
|
||||||
|
@ -47,5 +49,14 @@ function xmldb_book_upgrade($oldversion) {
|
||||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||||
// Put any upgrade step following this.
|
// Put any upgrade step following this.
|
||||||
|
|
||||||
|
if ($oldversion < 2021052501) {
|
||||||
|
$table = new xmldb_table('book_chapters');
|
||||||
|
$index = new xmldb_index('bookid', XMLDB_INDEX_NOTUNIQUE, ['bookid']);
|
||||||
|
if (!$dbman->index_exists($table, $index)) {
|
||||||
|
$dbman->add_index($table, $index);
|
||||||
|
}
|
||||||
|
upgrade_mod_savepoint(true, 2021052501, 'book');
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
defined('MOODLE_INTERNAL') || die;
|
defined('MOODLE_INTERNAL') || die;
|
||||||
|
|
||||||
$plugin->component = 'mod_book'; // Full name of the plugin (used for diagnostics)
|
$plugin->component = 'mod_book'; // Full name of the plugin (used for diagnostics)
|
||||||
$plugin->version = 2021052500; // The current module version (Date: YYYYMMDDXX)
|
$plugin->version = 2021052501; // The current module version (Date: YYYYMMDDXX)
|
||||||
$plugin->requires = 2021052500; // Requires this Moodle version
|
$plugin->requires = 2021052500; // Requires this Moodle version
|
||||||
$plugin->cron = 0; // Period for cron to check this module (secs)
|
$plugin->cron = 0; // Period for cron to check this module (secs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue