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

Chat hibernate class should respect old column names

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.0, 19.0
    • Fix Version/s: 12.0, 19.0
    • Component/s: Chat
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      The changes in KNL-945 cause this alter table [1] starting Sakai 12 with a converted database from Sakai 11.

      [1] alter table CHAT2_CHANNEL add enableUserOverride number(1,0) not null

      https://github.com/sakaiproject/sakai/blob/master/chat/chat-api/api/src/java/org/sakaiproject/chat2/model/ChatChannel.java#L119

      The column exists as "ENABLE_USER_OVERRIDE". You could see this name in other files (I guess not used now).

      https://github.com/sakaiproject/sakai/blob/master/chat/chat-impl/impl/src/bundle/chat-sql.properties#L3

      Here is the script from a Sakai 11 instance for this table:

       CREATE TABLE `CHAT2_CHANNEL` (
        `CHANNEL_ID` varchar(99) NOT NULL,
        `PLACEMENT_ID` varchar(99) DEFAULT NULL,
        `CONTEXT` varchar(99) NOT NULL,
        `CREATION_DATE` datetime DEFAULT NULL,
        `title` varchar(64) DEFAULT NULL,
        `description` varchar(255) DEFAULT NULL,
        `filterType` varchar(25) DEFAULT NULL,
        `filterParam` int(11) DEFAULT NULL,
        `timeParam` int(11) NOT NULL,
        `numberParam` int(11) NOT NULL,
        `placementDefaultChannel` bit(1) DEFAULT NULL,
        `ENABLE_USER_OVERRIDE` bit(1) DEFAULT NULL,
        `migratedChannelId` varchar(99) DEFAULT NULL,
        `START_DATE` datetime DEFAULT NULL,
        `END_DATE` datetime DEFAULT NULL,
        PRIMARY KEY (`CHANNEL_ID`),
        KEY `CHAT_CHANNEL_DEFAULT_I` (`placementDefaultChannel`),
        KEY `CHAT_CHANNEL_CONTEXT_I` (`CONTEXT`)
      )
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  jjmerono@um.es Juan José Meroño Sánchez
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code