diff options
author | Valentin Popov <info@valentineus.link> | 2019-05-08 00:17:40 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2019-05-08 00:17:40 +0300 |
commit | e2627eaf86a6fa9ee13681d729c5ec1b53610971 (patch) | |
tree | 74fb4b98f8dd1847e48b573de55c8a9412971fba /db/upgrade.php | |
parent | eb4b9b69f862df8ba23cafc8cd5e4a887baa02f0 (diff) | |
download | local_webhooks-e2627eaf86a6fa9ee13681d729c5ec1b53610971.tar.xz local_webhooks-e2627eaf86a6fa9ee13681d729c5ec1b53610971.zip |
Fixed errors from CI
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'db/upgrade.php')
-rw-r--r-- | db/upgrade.php | 20 |
1 files changed, 20 insertions, 0 deletions
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 |