From e2627eaf86a6fa9ee13681d729c5ec1b53610971 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 8 May 2019 01:17:40 +0400 Subject: Fixed errors from CI Signed-off-by: Valentin Popov --- db/upgrade.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'db') diff --git a/db/upgrade.php b/db/upgrade.php index 872b470..e661303 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -150,6 +150,21 @@ function save_records(array $records) { function xmldb_local_webhooks_upgrade(int $oldversion) { global $DB; + /* Update from versions 0.* */ + if (in_array($oldversion, [2017101900, 2017102500, 2017102600, 2017102610, 2017102620, 2017102630], true)) { + upgrade_plugin_savepoint(true, 2019040100, 'local', 'webhooks'); + } + + /* Update from versions 1.* */ + if (in_array($oldversion, [2017102700, 2017102900, 2017102910], true)) { + upgrade_plugin_savepoint(true, 2019040100, 'local', 'webhooks'); + } + + /* Update from versions 2.* */ + if (in_array($oldversion, [2017111800, 2017111810], true)) { + upgrade_plugin_savepoint(true, 2019040100, 'local', 'webhooks'); + } + /* Update from versions 3.* */ if (in_array($oldversion, [2017112600, 2018061900, 2018061910, 2018061920], true)) { $records = $DB->get_records('local_webhooks_service', null, 'id'); @@ -204,5 +219,10 @@ function xmldb_local_webhooks_upgrade(int $oldversion) { upgrade_plugin_savepoint(true, 2019040100, 'local', 'webhooks'); } + /* Update from versions 4.* */ + if (in_array($oldversion, [2017122900, 2018022500], true)) { + upgrade_plugin_savepoint(true, 2019040100, 'local', 'webhooks'); + } + return true; } \ No newline at end of file -- cgit v1.2.3