Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions cli/listuserfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@
$nonmatching = [];
$alluserrelatedcolumns = [];
$alluserrelatedcolumnswithtable = [];
$omittedtables = [];
foreach ($tables as $table) {
$columns = $DB->get_columns($table, false);
$schematable = $schema->getTable($table);
if (!$schematable) {
$omittedtables[$table] = $table;
continue;
}
$tablekeys = $schema->getTable($table)->getKeys();
$userrelatedbykeys = array_filter(
array_map(
Expand Down Expand Up @@ -139,5 +145,20 @@ function ($column) {
2,
);
}
if (count($omittedtables) <= 0) {
$log->output('INFO: There were no omitted tables: your database tables and XML definition are consistent.', 1);
} else {
$log->output(sprintf('INFO: Omitted tables (no XML definition found for %d tables):', count($omittedtables)), 1);
foreach ($omittedtables as $table) {
$log->output($table, 2);
}
$log->output('');
$log->output('Omitted tables can come for several reasons and they talk about your Moodle and database consistency:', 2);
$log->output('1. Uninstalled plugins, with kept database tables.', 3);
$log->output('2. Plugins without a proper install.xml definition.', 3);
$log->output('3. Manually created database tables, or other reasons.', 3);
$log->output('Recommendation: Double check these omitted tables to be sure they should exist and take the action ' .
'that fits better.', 1);
}
$log->finished();
cli_writeln('End!');
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2025090401;
$plugin->release = '(Mode vacation: off)';
$plugin->version = 2025091800;
$plugin->release = '(Focus on stability and extensibility)';
$plugin->requires = 2024100700; // Moodle 4.5+, https://moodledev.io/general/releases#moodle-45-lts.
$plugin->component = 'tool_mergeusers';
$plugin->maturity = MATURITY_STABLE;
Expand Down
Loading