Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-25092

Liferay 6.1 GA1 Image Gallery upgrade fails - unique constraint violation

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              mika.koivisto Mika Koivisto (Inactive)
              thoward Trey Howard (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10 years, 35 weeks, 6 days ago

                Packages

                  Version Package
                  --Sprint 11/12
                  6.2.0 CE M2