Upgrade not possible. --> Database failure. Please refer to suitecrm.log for details. šŸ¤”

Hey @shad Iā€™m using utf8_general_ci. However, Iā€™m unclear on what the 1000 byte limit applies to. I have no fields anywhere near that:

Username =60
user_hash = 255
first _name 255
last_name = 255
is_group=1
id= 36
Status = 100

Is it the sum of all these that canā€™t be over 1000?

Hello @pstevens

The 1000 byte limit is the stored amount of data. What that translates to in terms of actual character length is a bit variable depending on some database settings.

I think it is 3-4 bytes per character so the total length of a all characters in the index is maybe 250. Technically only part of the column can be indexed but that gets weird sometimes.

Most commonly we really donā€™t need much more than 20-30 characters for either first or last names.

I also believe status is either Active or Inactive so you could likely save some space there.

So basically, I go in the DB and shorten up those field lengths? (careful not to truncate anything)?

Exactly. Thatā€™s what I had to do.

There are some sample queries in this thread to check what your current max lengths are

1 Like

Thanks @shad at first I couldnā€™t change the field length in Studio because I would get database failure when trying to change the value. So I FIRST changed the column length in the Database. Then I would still get database failure on rebuild because the DB didnā€™t match SuiteCRM vardefs.

Soā€¦ magic trickā€¦ First change the DB length, THEN change them in SuiteCRM Studio to match. THEN repair and rebuild. Now all tables synced!!! Thanks for the help.

OH, one further update. The Server Iā€™m having trouble with this problem on is MySQL 5.6

I have another installation on MySQL 5.7 that upgrade without issue. I havenā€™t tried it but I suspect that if I upgraded to from 5.6 to 5.7 the problem will be solved. Itā€™s a production server so I donā€™t want to experiment, but if anyone else has this issue and tries the MySQL upgrade Iā€™d love to know how it turns out.