From 46e9c47368fe808498e96ae117e2b58aee6914ab Mon Sep 17 00:00:00 2001 From: Sergey Zavarzin Date: Thu, 4 Jul 2024 12:02:18 +0300 Subject: [PATCH] fix upgrade.php - field default value --- db/upgrade.php | 24 ++++++++++++------------ version.php | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/db/upgrade.php b/db/upgrade.php index f2596f3..361c9db 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -1152,18 +1152,6 @@ function block_exaport_wrong_personal_information_upgrade_2012120301($matches) { } - if ($oldversion < 2024061300){ - // Update a field for the table block_exaportresume - $table = new xmldb_table('block_exaportresume'); - $field = new xmldb_field('courseid', XMLDB_TYPE_INTEGER, '20', null, XMLDB_NOTNULL, null, '0'); - if ($dbman->field_exists($table, $field)) { - $dbman->change_field_default($table, $field); - } - - // Exaport savepoint reached. - upgrade_block_savepoint(true, 2024061300, 'exaport'); - } - if ($oldversion < 2024070300) { $table = new xmldb_table('block_exaportcate'); @@ -1177,6 +1165,18 @@ function block_exaport_wrong_personal_information_upgrade_2012120301($matches) { } + if ($oldversion < 2024070301){ + // Update a field for the table block_exaportresume + $table = new xmldb_table('block_exaportresume'); + $field = new xmldb_field('courseid', XMLDB_TYPE_INTEGER, '20', null, XMLDB_NOTNULL, null, '0'); + if ($dbman->field_exists($table, $field)) { + $dbman->change_field_default($table, $field); + } + + // Exaport savepoint reached. + upgrade_block_savepoint(true, 2024070301, 'exaport'); + } + return $result; } diff --git a/version.php b/version.php index efe2535..b7d46bf 100644 --- a/version.php +++ b/version.php @@ -19,6 +19,6 @@ $plugin->component = 'block_exaport'; $plugin->release = '4.6.7'; -$plugin->version = 2024070300; +$plugin->version = 2024070301; $plugin->requires = 2021051700; // moodle 3.11 $plugin->maturity = MATURITY_STABLE;