Duplicate
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
MikaMMikaMReporter
Trey HowardTrey HowardLabels
Epic/Theme
Fix Priority
4Fix versions
Affects versions
Priority
Medium
Details
Details
Assignee
MikaM
MikaMReporter
Trey Howard
Trey HowardLabels
Epic/Theme
Fix Priority
4
Fix versions
Affects versions
Priority
Zendesk Support
Zendesk Support
Zendesk Support
Created January 24, 2012 at 10:03 AM
Updated June 24, 2023 at 3:53 PM
Resolved February 2, 2012 at 12:22 PM
See related forum thread:
http://www.liferay.com/community/forums/-/message_boards/message/12218337
To reproduce:
1. In 6.0.x, create 2 image gallery entities that have the same groupId, folderId, and name values in the igimage table.
2. Perform migration to 6.1
Upgrade will fail on the UpgradeImageGallery step:
19:49:25,440 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery
19:49:25,597 ERROR [MainServlet:198] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '10546-0-bengals' for key 'IX_ED5CA615'
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '10546-0-bengals' for key 'IX_ED5CA615'
Note that the igimage table uses a non-unique index for these 3 columns: KEY `IX_AAE8DF83` (`groupId`,`folderId`,`name`)
Note that the dlentryfile table uses a unique index for the corresponding migration columns: UNIQUE KEY `IX_ED5CA615` (`groupId`,`folderId`,`title`)
The UpgradeImageGallery step needs some extra logic to handle this situation.