From: Matthias Schmidt Date: Fri, 18 Dec 2020 18:36:07 +0000 (+0100) Subject: Revert "Fix DatabaseTableChangeProcessor::getColumnByName() for WSC < 5.4" X-Git-Tag: 5.4.0_Alpha_1~534 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f5e4937061ff0659b7280c0393b4d8b14e2281c;p=GitHub%2FWoltLab%2FWCF.git Revert "Fix DatabaseTableChangeProcessor::getColumnByName() for WSC < 5.4" This reverts commit 7c8a1b332fd09ddb046dccfba9e92c463a18a414. --- diff --git a/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php b/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php index e05c67c607..562ff27db7 100644 --- a/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php @@ -1217,7 +1217,10 @@ class DatabaseTableChangeProcessor { */ protected function getColumnByName($columnName, DatabaseTable $updateTable, DatabaseTable $existingTable = null) { foreach ($updateTable->getColumns() as $column) { - if ($column->getName() === $columnName) { + if ( + ($column->getNewName() === $columnName) + || ($column->getName() === $columnName && !$column->getNewName()) + ) { return $column; } }