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

Data type is not provided when upgrading RatingsStats table, leading to upgrade warnings

    Details

    • Fix Priority:
      4

      Description

      When upgrading from 7.2 to 7.3 the following warning is encountered

      Mar 20, 19:32:27.839 build-3528 [liferayupgrade-59d88f4f47-2vr5h] 2020-03-21 00:32:27.838 WARN [main][UpgradeProcess:386] Attempting to upgrade table RatingsStats by recreating the table due to: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

      This upgrade step is not providing the data type of the new column to be added:

      https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/upgrade/v7_3_x/UpgradeRatingsStats.java#L32

      The data type should be provided like in this example:

      https://github.com/liferay/liferay-portal/blob/master/modules/apps/layout/layout-seo-service/src/main/java/com/liferay/layout/seo/internal/upgrade/v2_1_0/UpgradeSchema.java#L30

      Steps to reproduce it

      1. Upgrade to master with a 7.2 database

      Results:
      You see the following exception:

      Mar 20, 19:32:27.839  build-3528 [liferayupgrade-59d88f4f47-2vr5h] 2020-03-21 00:32:27.838 WARN  [main][UpgradeProcess:386] Attempting to upgrade table RatingsStats by recreating the table due to: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
      

      Expected results:
      Previous exception is not thrown and the RatingsStats table has the following fields:

      • createDate
      • modifiedDate

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  20 weeks, 2 days ago

                  Packages

                  Version Package
                  Master