Skip to content

Commit 178ead8

Browse files
Merge pull request #20 from catalyst/issue19
Issue #19: Fixed DB Schema divergences
2 parents ee065d6 + 09630fe commit 178ead8

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

db/upgrade.php

+15
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,20 @@ function xmldb_auth_basic_upgrade($oldversion) {
5252
upgrade_plugin_savepoint(true, 2018121400, 'auth', 'auth_basic');
5353
}
5454

55+
if ($oldversion < 2020083100) {
56+
57+
// Changing the default of field usage on table auth_basic_master_password to 0.
58+
$table = new xmldb_table('auth_basic_master_password');
59+
$field = new xmldb_field('usage', XMLDB_TYPE_INTEGER, '10', null, null, null, '0', 'password');
60+
61+
// Launch change of default for field usage.
62+
$dbman->change_field_default($table, $field);
63+
// Launch change of nullability for field usage.
64+
$dbman->change_field_notnull($table, $field);
65+
66+
// Basic savepoint reached.
67+
upgrade_plugin_savepoint(true, 2020083100, 'auth', 'basic');
68+
}
69+
5570
return true;
5671
}

version.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424

2525
defined('MOODLE_INTERNAL') || die();
2626

27-
$plugin->version = 2018121400; // The current plugin version (Date: YYYYMMDDXX).
28-
$plugin->release = 2018121400; // Match release exactly to version.
27+
$plugin->version = 2020083100; // The current plugin version (Date: YYYYMMDDXX).
28+
$plugin->release = 2020083100; // Match release exactly to version.
2929
$plugin->requires = 2014050800; // Requires this Moodle version.
3030
$plugin->component = 'auth_basic'; // Full name of the plugin (used for diagnostics).
3131
$plugin->maturity = MATURITY_STABLE;
32-

0 commit comments

Comments
 (0)