diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c7590bbb9..7ce70ffaf 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,6 +4,7 @@ - Deprecated WebGUI::Storage::Image. WebGUI::Storage can now do everything WebGUI::Storage::Image can do. - The deprecated use of Graphics::Magick has been eliminated. WebGUI uses Image::Magick exclusively for all image processing functions once again. - fixed: #9147: Misspellings in Account + - fixed: a bug in Crud where keys being updated would cause a crash - fixed: #9148: Account: account links do not work - fixed: #9149: Account: default templates do not work right - fixed: Adding a file extension for URLs in the system settings now properly affects newly created Assets. It still does not update existing asset URL's. diff --git a/lib/WebGUI/Crud.pm b/lib/WebGUI/Crud.pm index c63e790f6..0f548065f 100644 --- a/lib/WebGUI/Crud.pm +++ b/lib/WebGUI/Crud.pm @@ -465,7 +465,7 @@ sub crud_updateTable { else { $db->write("alter table $tableName add column ".$dbh->quote_identifier($property)." $fieldType $notNullClause $defaultClause"); } - if ($isKey) { + if ($isKey && !$tableFields{$property}{key}) { $db->write("alter table $tableName add index ".$dbh->quote_identifier($property)." (".$dbh->quote_identifier($property).")"); } delete $tableFields{$property};