Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-44167

ContentReview duplicate index name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 21.0 [Tentative]
    • Fix Version/s: 21.0 [Tentative]
    • Component/s: content review
    • Labels:
      None
    • Test Plan:
      Hide

      From the database perform and ensure the you see the unique key/index `UK_8dngr1v68kkv4u11c1nvrjj1l` (`PROVIDERID`,`CONTENTID`),:

       

      show create table sakai_master.CONTENTREVIEW_ITEM;
      CREATE TABLE `CONTENTREVIEW_ITEM` (
       `ID` bigint(20) NOT NULL AUTO_INCREMENT,
       `VERSION` int(11) NOT NULL,
       `PROVIDERID` int(11) NOT NULL,
       `CONTENTID` varchar(255) NOT NULL,
       `USERID` varchar(255) DEFAULT NULL,
       `SITEID` varchar(255) DEFAULT NULL,
       `TASKID` varchar(255) DEFAULT NULL,
       `EXTERNALID` varchar(255) DEFAULT NULL,
       `DATEQUEUED` datetime NOT NULL,
       `DATESUBMITTED` datetime DEFAULT NULL,
       `DATEREPORTRECEIVED` datetime DEFAULT NULL,
       `STATUS` bigint(20) DEFAULT NULL,
       `REVIEWSCORE` int(11) DEFAULT NULL,
       `LASTERROR` longtext DEFAULT NULL,
       `RETRYCOUNT` bigint(20) DEFAULT NULL,
       `NEXTRETRYTIME` datetime NOT NULL,
       `ERRORCODE` int(11) DEFAULT NULL,
       PRIMARY KEY (`ID`),
       UNIQUE KEY `UK_8dngr1v68kkv4u11c1nvrjj1l` (`PROVIDERID`,`CONTENTID`),
       KEY `contentreview_provider_id_idx` (`EXTERNALID`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8
      

       

      Show
      From the database perform and ensure the you see the unique key/index `UK_8dngr1v68kkv4u11c1nvrjj1l` (`PROVIDERID`,`CONTENTID`),:   show create table sakai_master.CONTENTREVIEW_ITEM; CREATE TABLE `CONTENTREVIEW_ITEM` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT, `VERSION` int(11) NOT NULL, `PROVIDERID` int(11) NOT NULL, `CONTENTID` varchar(255) NOT NULL, `USERID` varchar(255) DEFAULT NULL, `SITEID` varchar(255) DEFAULT NULL, `TASKID` varchar(255) DEFAULT NULL, `EXTERNALID` varchar(255) DEFAULT NULL, `DATEQUEUED` datetime NOT NULL, `DATESUBMITTED` datetime DEFAULT NULL, `DATEREPORTRECEIVED` datetime DEFAULT NULL, `STATUS` bigint(20) DEFAULT NULL, `REVIEWSCORE` int(11) DEFAULT NULL, `LASTERROR` longtext DEFAULT NULL, `RETRYCOUNT` bigint(20) DEFAULT NULL, `NEXTRETRYTIME` datetime NOT NULL, `ERRORCODE` int(11) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `UK_8dngr1v68kkv4u11c1nvrjj1l` (`PROVIDERID`,`CONTENTID`), KEY `contentreview_provider_id_idx` (`EXTERNALID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8  

      Description

      The ContentReviewItem.hbm.xml declares 2 indexes with the same name "contentreview_provider_id_idx".

      Though it appears as though hibernate figures this out and creates one according to its default internal index id generator:

      alter table CONTENTREVIEW_ITEM add constraint UK_8dngr1v68kkv4u11c1nvrjj1l unique (PROVIDERID, CONTENTID);

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                ern Earle R Nietzel
                Reporter:
                ern Earle R Nietzel
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration