Browse Source
Add caleventid index to attendance_sessions table #484 (#487)
nwp90-nwp90-allsessionsreport
kristian-94
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
13 additions and
1 deletions
-
db/upgrade.php
-
version.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; |
|
|
return $result; |
|
|
} |
|
|
} |
|
|
|
@ -23,7 +23,7 @@ |
|
|
*/ |
|
|
*/ |
|
|
defined('MOODLE_INTERNAL') || die(); |
|
|
defined('MOODLE_INTERNAL') || die(); |
|
|
|
|
|
|
|
|
$plugin->version = 2020071700; |
|
|
$plugin->version = 2020072900; |
|
|
$plugin->requires = 2019072500; // Requires 3.8. |
|
|
$plugin->requires = 2019072500; // Requires 3.8. |
|
|
$plugin->release = '3.8.3'; |
|
|
$plugin->release = '3.8.3'; |
|
|
$plugin->maturity = MATURITY_STABLE; |
|
|
$plugin->maturity = MATURITY_STABLE; |
|
|