I am upgrading from 5.19.1 to 5.25.5. This is an existing mattermost server that’s been upgraded several times before without issue.
After performing the upgrade procedure as per documentation, when I attempt to start mattermost, it fails with this error-
Oct 19 17:03:55 mattermost mattermost[5981]: {"level":"info","ts":1603145035.0427167,"caller":"utils/i18n.go:83","msg":"Loaded system translations","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
Oct 19 17:03:55 mattermost mattermost[5981]: {"level":"info","ts":1603145035.0428789,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
Oct 19 17:03:55 mattermost mattermost[5981]: {"level":"info","ts":1603145035.0453696,"caller":"sqlstore/supplier.go:227","msg":"Pinging SQL","database":"master"}
Oct 19 17:03:55 mattermost mattermost[5981]: {"level":"warn","ts":1603145035.0580902,"caller":"sqlstore/upgrade.go:200","msg":"Attempting to upgrade the database schema version","current_version":"5.21.0","new_version":"5.22.0"}
Oct 19 17:03:55 mattermost mattermost[5981]: {"level":"error","ts":1603145035.0597358,"caller":"sqlstore/supplier.go:915","msg":"Failed to create index","error":"Error 1170: BLOB/TEXT column 'DefaultChannelGuestRole' used in key specification without a key length"}
I have googled the error and haven’t found anything, please let me know if you have any suggestions
This may be an issue related to the character type that is set for the column DefaultChannelGuestRole. I get this from the text that says "DefaultChannelGuestRole used in key specification without a length," which makes me think that the character set is either not set correctly, or not valid. Would you be able to provide a sample for that portion of your database schema to look over?
I apologize for the delay in response, I’ve been quite busy of late. I do agree, it looks like the columns are incorrectly syntax, I do believe that changing to varchar(64) should work, I’ll be interested to see the result!
I am writing to confirm that converting DefaultTeamGuestRole and DefaultChannelGuestRole to varchar(64) fixed the issue and let me upgrade without any problems.