"Specified key was too long" warnings when upgrading from 7.2 to 2023.q3.2
How To articles are not official guidelines or officially supported
documentation. They are community-contributed content and may not always
reflect the latest updates to Liferay DXP. We welcome your feedback to
improve How to articles!
While we make every effort to ensure this Knowledge Base is accurate,it
may not always reflect the most recent updates or official guidelines.We
appreciate your understanding and encourage you to reach out with any
feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- We are upgrading from 7.2 to 7.4
-
When running the upgrade tool, there is this WARN:
WARN [main][BaseDB:1468] (conn=697) Specified key was too long; max key length is 3072 bytes: create index IX_F365A086 on DDMTemplate (templateKey, ctCollectionId);
Resolution
- Check the type of the ddmtemplate.templatekey column in the original (pre-upgrade) database. Normally it should be varchar(75), but perhaps in your case it is longtext, and that's what causes this warning. (we are not sure why this column ended up being longtext, it might have something to do with a bug during previous upgrades from an even older version)
- Check to see if you have data in the templatekey column that are greater than 75 characters
- if not, simply try to change the type of the templatekey column to varchar(75) and then perform the upgrade again from scratch. This time the warning should not appear anymore.
Did this article resolve your issue ?