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

Calendar portlet's CalendarBooking description is not upgraded to TEXT data type

    Details

      Description

      Notes:

      • Due to LPS-35260 setting CalendarBooking description as "EDITOR" with the max-length of a CLOB type in portlet-model-hints.xml, an upgrade process is needed because tables.sql was not generated for Calendar in ee-6.2.x branch. LPS-44833 seemed to have generated tables.sql for Master.
      • MySQL environment automatically creates a longtext so the issue shouldn't be able to be reproduced unless using database servers like Oracle, SQL Server, DB2.
      • Upgrading to Master is currently blocked, LPS-46021 was created to track this, used alternative/additional test steps in the meantime.

      Master SQL Server Steps:
      1. start up a default liferay-portal-6.2.10.1-ee-ga1 environment using Oracle/SQL Server/PostgreSQL
      2. deploy the Calendar plugin (MP Plugin: calendar-portlet-6.2.10.9.war or ee-6.2.x plugin)
      3. check the database table CalendarBooking, description column should be set as NVARCHAR(2000) or equivalent to a non-CLOB/TEXT type, this is due to tables.sql being set as "STRING", use the following SQL query command:

      describe CalendarBooking;
      

      4. shut down the server
      5. start up Master liferay-portal to trigger the upgrade process to 7.0.0 in order to deploy Master Calendar plugin
      6. in new upgraded Master environment, deploy the Calendar plugin

      Expected Behavior: Due to the database change to the description column, an upgrade process should trigger to update table data types.

      Actual Behavior: Due to no upgrade process available, old tables containing the tables.sql's "STRING" type will have the columns still set as NVARCHAR(2000) or equivalent to a non-CLOB/TEXT type.

      ----------

      Additional Tests:
      62 SQL Server Steps:
      1. start up a default liferay-portal-6.2.10.1-ee-ga1 environment using Oracle/SQL Server/PostgreSQL
      2. deploy the Calendar plugin (current MP Plugin: calendar-portlet-6.2.10.9.war)
      3. check the database table CalendarBooking, description column should be set as NVARCHAR(2000) or equivalent to a non-CLOB/TEXT type, this is due to tables.sql being set as "STRING", use the following SQL query command:

      describe CalendarBooking;
      

      4. shut down the server
      5. update calendar-portlet/WEB-INF/sql/tables.sql's description type from "STRING" to "TEXT", LPS-44833 generated file was not created/backported in ee-6.2.x (so current liferay-plugins-ee 62x GitId: a4ab204139964bf4c88f874db8ca2e5970c8aef4 will not have the "TEXT" data type fix that Master has)
      6. deploy the modified portlet, no upgrade process or changes were made because Calendar portlets have already been deployed so CalendarBooking description column is still set as NVARCHAR(2000), only for new environments creating the Calendar tables would be set as NVARCHAR(MAX)

        Attachments

        1. fixed-db2.png
          fixed-db2.png
          14 kB
        2. fixed-oracle.png
          fixed-oracle.png
          25 kB
        3. fixed-sql08.png
          fixed-sql08.png
          20 kB
        4. reproduced.png
          reproduced.png
          13 kB

          Issue Links

            Activity

              People

              Assignee:
              hong.zhao Hong Zhao (Inactive)
              Reporter:
              jenny.chen Jenny Chen
              Participants of an Issue:
              Recent user:
              Luciana Silva
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 26 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE