11388907fSMichael Schramm<?php 21388907fSMichael Schramm/** 31388907fSMichael Schramm * webtrees: online genealogy 4*6bdf7674SGreg Roach * Copyright (C) 2017 webtrees development team 51388907fSMichael Schramm * This program is free software: you can redistribute it and/or modify 61388907fSMichael Schramm * it under the terms of the GNU General Public License as published by 71388907fSMichael Schramm * the Free Software Foundation, either version 3 of the License, or 81388907fSMichael Schramm * (at your option) any later version. 91388907fSMichael Schramm * This program is distributed in the hope that it will be useful, 101388907fSMichael Schramm * but WITHOUT ANY WARRANTY; without even the implied warranty of 111388907fSMichael Schramm * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 121388907fSMichael Schramm * GNU General Public License for more details. 131388907fSMichael Schramm * You should have received a copy of the GNU General Public License 141388907fSMichael Schramm * along with this program. If not, see <http://www.gnu.org/licenses/>. 151388907fSMichael Schramm */ 161388907fSMichael Schrammnamespace Fisharebest\Webtrees\Schema; 171388907fSMichael Schramm 181388907fSMichael Schrammuse Fisharebest\Webtrees\Database; 191388907fSMichael Schrammuse PDOException; 201388907fSMichael Schramm 211388907fSMichael Schramm/** 221388907fSMichael Schramm * Upgrade the database schema from version 32 to version 33. 231388907fSMichael Schramm */ 241388907fSMichael Schrammclass Migration32 implements MigrationInterface { 251388907fSMichael Schramm /** 261388907fSMichael Schramm * Upgrade to to the next version 271388907fSMichael Schramm */ 281388907fSMichael Schramm public function upgrade() { 291388907fSMichael Schramm try { 301388907fSMichael Schramm Database::prepare( 31af1e6d0cSGreg Roach "ALTER TABLE `##site_setting` CHANGE setting_value setting_value VARCHAR(2000) NOT NULL" 321388907fSMichael Schramm )->execute(); 331388907fSMichael Schramm } catch (PDOException $ex) { 34af1e6d0cSGreg Roach // Already done? 351388907fSMichael Schramm } 364c0b5256SGreg Roach 374c0b5256SGreg Roach Database::prepare( 384c0b5256SGreg Roach "DELETE FROM `##change` WHERE old_gedcom = '' AND new_gedcom = ''" 394c0b5256SGreg Roach )->execute(); 401388907fSMichael Schramm } 411388907fSMichael Schramm} 42