MDL-62478 upgrade: add 3.5.0 separation line to all upgrade scripts
[moodle.git] / repository / flickr / db / upgrade.php
blob1bc5342b878135fe802981ea302cf6d01c9a4180
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17 /**
18 * Plugin upgrade steps are defined here.
20 * @package repository_flickr
21 * @category upgrade
22 * @copyright 2017 David Mudrák <david@moodle.com>
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 defined('MOODLE_INTERNAL') || die();
28 /**
29 * Execute repository_flickr upgrade from the given old version.
31 * @param int $oldversion
32 * @return bool
34 function xmldb_repository_flickr_upgrade($oldversion) {
35 global $DB;
37 $dbman = $DB->get_manager();
39 if ($oldversion < 2017082200) {
40 // Drop legacy flickr auth tokens and nsid's.
41 $DB->delete_records('user_preferences', ['name' => 'flickr_']);
42 $DB->delete_records('user_preferences', ['name' => 'flickr__nsid']);
44 upgrade_plugin_savepoint(true, 2017082200, 'repository', 'flickr');
47 // Automatically generated Moodle v3.4.0 release upgrade line.
48 // Put any upgrade step following this.
50 // Automatically generated Moodle v3.5.0 release upgrade line.
51 // Put any upgrade step following this.
53 return true;