Take the array key into account when checking whether an unnamed KEY matches in Datab...
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 21 Sep 2021 14:31:17 +0000 (16:31 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 21 Sep 2021 14:52:13 +0000 (16:52 +0200)
commitbba6c47145d44928b22be80b057cfefd1b386f8f
tree702fcf27a386883aeb2372321d389508de87cebe
parent039e0184177497d17281e9b6dc08fb4c46c4ee2d
Take the array key into account when checking whether an unnamed KEY matches in DatabaseTableChangeProcessor

The reproducer effectively matches d7f721d6f920d66f75102723b504d89e57a8c9ff, except that the KEY
is unnamed.

Previously the update would silently fail to do anything. Now the update fails
loudly, because it attempts to create another index with an existing name. This
is no different behavior compared to an INDEX collision of two unnamed indices
`(a, b)`, `(a, c)`. The developer will be clearly alerted of this issue and can
take appropriate measures to avoid it, e.g. by using explicit names.

see #4434
wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php