. */ use Fisharebest\Webtrees\Database; use PDOException; /** * Class Migration11 - upgrade the database schema from version 11 to version 12. */ class Migration11 implements MigrationInterface { /** {@inheritDoc} */ public function upgrade() { // - delete the wt_name.n_list column; it has never been used // - a bug in webtrees 1.1.2 caused the wt_name.n_full column // to include slashes around the surname. These are unnecessary, // and cause problems when we try to match the name from the // gedcom with the name from the table. // Remove slashes from INDI names Database::exec("UPDATE `##name` SET n_full=REPLACE(n_full, '/', '') WHERE n_surn IS NOT NULL"); try { Database::exec("ALTER TABLE `##name` DROP n_list"); } catch (PDOException $x) { // Already done? } } }