diff --git a/db/upgrade.php b/db/upgrade.php index 7131823..f86843c 100755 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -628,5 +628,17 @@ function xmldb_attendance_upgrade($oldversion=0) { } + if ($oldversion < 2020072900) { + $table = new xmldb_table('attendance_sessions'); + + // Conditionally launch add index caleventid. + $index = new xmldb_index('caleventid', XMLDB_INDEX_NOTUNIQUE, array('caleventid')); + if (!$dbman->index_exists($table, $index)) { + $dbman->add_index($table, $index); + } + // Attendance savepoint reached. + upgrade_mod_savepoint(true, 2020072900, 'attendance'); + } + return $result; } diff --git a/version.php b/version.php index a38c246..0e81a31 100755 --- a/version.php +++ b/version.php @@ -23,7 +23,7 @@ */ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2020071700; +$plugin->version = 2020072900; $plugin->requires = 2019072500; // Requires 3.8. $plugin->release = '3.8.3'; $plugin->maturity = MATURITY_STABLE;