Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.X EE, 7.0.X, Master
-
7.0.x
-
Committed
-
5
-
4
-
Database Upgrade
-
- LocalFile.CPDocumentsandmedia#MoveToRecycleBinDocument
- LocalFile.CPDocumentsandmedia#ViewImageEditorControls
- LocalFile.DocumentsadministrationUsecase#AddAndRemoveMetadataSets
- LocalFile.DocumentsadministrationUsecase#AddDocumentTypeAndMetadata
- LocalFile.DocumentsadministrationUsecase#UpdateDocumentTypeWithPermissions
- LocalFile.DocumentsadministrationUsecase#ViewDateFieldRequiredInContract
-
29
Description
Reproducing steps for master or 7.0.x
- Take a Liferay 6.2.10 installation with a database with Oracle. Make sure all indexes are present. (This might not be the case after portal-160 for a table like KaleoLog due to the present bug.)
- Upgrade to master. (For some entities the upgrade goes to the fallback procedure of recreating the table and indexes.)
- Check database indexes for the tables:
- KaleoLog
- LayoutPrototype
- ShoppingCart
- ShoppingOrder
- ShoppingOrderItem
- DDMStructure
- DDMTemplate
- JournalArticle
- CalendarBooking
Expected: Indexes are present.
Observed: (Not all) Indexes are not present.
Reproducing steps for 6.2.x or 6,2.10 with portal-160+
- Start Liferay.
- Check database indexes for the table KaleoLog.
Expected: Indexes are present.
Observed: Indexes are not present.
Notes
The problem comes from:
- using the method com.liferay.portal.kernel.dao.db.DB#runSQLTemplateString(java.sql.Connection, java.lang.String, boolean, boolean) called in com.liferay.portal.upgrade.util.BaseUpgradeTableImpl#updateTable(java.sql.Connection, java.sql.Connection, boolean), which expects the last line of a sql to end in semicolon,
- the sql sentences in the array TABLE_SQL_ADD_INDEXES in the classes *Table.java not ending in semicolon.