. */ use Fisharebest\Webtrees\Database; use PDOException; /** * Class Migration18 - upgrade the database schema from version 18 to version 19. */ class Migration18 implements MigrationInterface { /** {@inheritDoc} */ public function upgrade() { // Update some indexes, based on analysis of slow-query-logs try { Database::exec( "ALTER TABLE `##places`" . " DROP KEY ix1," . " DROP KEY ix2," . " DROP KEY ix3," . " DROP KEY ix4," . " DROP p_level," . // Not needed - implicit from p_parent " ADD KEY ix1 (p_file, p_place)," . // autocomplete.php, find.php " ADD UNIQUE KEY ux1 (p_parent_id, p_file, p_place)" // placelist.php ); } catch (PDOException $ex) { // Already done? } } }