xref: /webtrees/app/Schema/Migration34.php (revision 19d913785a45657df3e7bc9cd4411f501dd5071b)
1168ff6f3Sric2016<?php
2168ff6f3Sric2016/**
3168ff6f3Sric2016 * webtrees: online genealogy
41062a142SGreg Roach * Copyright (C) 2018 webtrees development team
5168ff6f3Sric2016 * This program is free software: you can redistribute it and/or modify
6168ff6f3Sric2016 * it under the terms of the GNU General Public License as published by
7168ff6f3Sric2016 * the Free Software Foundation, either version 3 of the License, or
8168ff6f3Sric2016 * (at your option) any later version.
9168ff6f3Sric2016 * This program is distributed in the hope that it will be useful,
10168ff6f3Sric2016 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11168ff6f3Sric2016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12168ff6f3Sric2016 * GNU General Public License for more details.
13168ff6f3Sric2016 * You should have received a copy of the GNU General Public License
14168ff6f3Sric2016 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15168ff6f3Sric2016 */
16168ff6f3Sric2016namespace Fisharebest\Webtrees\Schema;
17168ff6f3Sric2016
18f36626dbSGreg Roachuse Fisharebest\Webtrees\Database;
19168ff6f3Sric2016use Fisharebest\Webtrees\Module;
20168ff6f3Sric2016
21168ff6f3Sric2016/**
2215e87d46SGreg Roach * Upgrade the database schema from version 34 to version 35.
23168ff6f3Sric2016 */
24c1010edaSGreg Roachclass Migration34 implements MigrationInterface
25c1010edaSGreg Roach{
26168ff6f3Sric2016    /**
27f36626dbSGreg Roach     * Upgrade to to the next version
28*19d91378SGreg Roach     *
29*19d91378SGreg Roach     * @return void
30168ff6f3Sric2016     */
31c1010edaSGreg Roach    public function upgrade()
32c1010edaSGreg Roach    {
33f36626dbSGreg Roach        // New modules (charts) have been added.
34168ff6f3Sric2016        Module::getInstalledModules('enabled');
35f36626dbSGreg Roach
36f36626dbSGreg Roach        // Delete old/unused settings
37f36626dbSGreg Roach        Database::exec(
38f36626dbSGreg Roach            "DELETE FROM `##gedcom_setting` WHERE setting_name IN ('COMMON_NAMES_ADD', 'COMMON_NAMES_REMOVE', 'COMMON_NAMES_THRESHOLD')"
39f36626dbSGreg Roach        );
40168ff6f3Sric2016    }
41168ff6f3Sric2016}
42