Skip to content

Commit

Permalink
issue #173: Clean up table cleaner_muc_configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottVerbeek committed Jan 30, 2024
1 parent 173f062 commit 82da92f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Upgrade logic.
*
* @package local_datacleaner
* @copyright 2024 Catalyst IT
* @author Scott Verbeek <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/


/**
* Performs data migrations and updates on upgrade.
*
* @param int $oldversion
* @return bool
*/
function xmldb_local_datacleaner_upgrade($oldversion = 0): bool{
global $DB;
$dbman = $DB->get_manager();
if ($oldversion < 2022020301) {
// Clean up table.
$table = new xmldb_table('cleaner_muc_configs');
if ($dbman->table_exists($table)) {
$dbman->drop_table($table);
}

upgrade_plugin_savepoint(true, 2022020301, 'local', 'datacleaner');
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2022020300;
$plugin->version = 2022020301;
$plugin->release = '2.3.10';
$plugin->maturity = MATURITY_STABLE;
$plugin->requires = 2021051700; // Moodle 3.11 release and upwards.
Expand Down

0 comments on commit 82da92f

Please sign in to comment.