From 4f5e4937061ff0659b7280c0393b4d8b14e2281c Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 18 Dec 2020 19:36:07 +0100 Subject: [PATCH] Revert "Fix DatabaseTableChangeProcessor::getColumnByName() for WSC < 5.4" This reverts commit 7c8a1b332fd09ddb046dccfba9e92c463a18a414. --- .../database/table/DatabaseTableChangeProcessor.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } -- 2.20.1