diff options
Diffstat (limited to 'app/Schema/Migration11.php')
| -rw-r--r-- | app/Schema/Migration11.php | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/app/Schema/Migration11.php b/app/Schema/Migration11.php index 9316504cb7..5bd60d7230 100644 --- a/app/Schema/Migration11.php +++ b/app/Schema/Migration11.php @@ -22,25 +22,27 @@ use PDOException; /** * Upgrade the database schema from version 11 to version 12. */ -class Migration11 implements MigrationInterface { - /** - * Upgrade to to the next version - */ - 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"); +class Migration11 implements MigrationInterface +{ + /** + * Upgrade to to the next version + */ + 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 $ex) { - DebugBar::addThrowable($ex); + try { + Database::exec("ALTER TABLE `##name` DROP n_list"); + } catch (PDOException $ex) { + DebugBar::addThrowable($ex); - // Already done? - } - } + // Already done? + } + } } |
