How to upgrade from v.5.30.1

For feature requests, please see: http://www.mattermost.org/feature-requests/.

For troubleshooting questions, please post in the following format:

Summary
What would be the recommended way to upgrade from 5.30.1

Version: 5.30.0
Build Number: 5.30.1
Build Date: Fri Dec 18 13:07:15 UTC 2020
Build Hash: 25659c5b436aac171aedbee39ded4bc2ffac9838
Build Enterprise Ready: true
DB Version: 5.30.0

Steps to reproduce
How can we reproduce the issue (what version are you using?)

Expected behavior
Describe your issue in detail

Observed behavior
What did you see happen? Please include relevant error messages and/or screenshots.

This recent thread will likely be helpful: Upgrading from v5.1 to v7.1.

Hi Amy,

Not really helpful since i do not use docker. I did checked documentation, yet it does not make specific statements.

So after a few trials, I managed to upgrade to latest release, managed to have the instance back online, with a few downsides.

  • the channels and teams are not recognised at login
  • they are still in the DB and the only issue mattermost does not call them.
  • when I made connection to local IP, it worked better
  • when connecting from nginx proxy, they do not show up.

I get this repetitively in console:

warn [2022-10-27 15:32:33.483 +02:00] Error while populating webconn config caller="api4/websocket.go:58" id=undefined error="invalid connection id: undefined"
error [2022-10-27 15:32:33.761 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=u351q3fddfgiukt5tj3c7mh7aw ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
error [2022-10-27 15:32:33.761 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=acqcfifhrffxjdm77d9eacjqcr ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"
error [2022-10-27 15:32:33.798 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=4k67spbfhifzdro7chk95untie ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
error [2022-10-27 15:32:33.807 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=jwzj8saye7dgddop98y8r87p1e ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"
error [2022-10-27 15:32:33.859 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=a373qa6e57n9pek93fu8xamkyo ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
error [2022-10-27 15:32:33.860 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=8aj1ie18rjdntk4apf7jdb6fha ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"
error [2022-10-27 15:32:33.920 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=9d4hhcuekinhjxd4b9yf8ca7uw ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
error [2022-10-27 15:32:33.920 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=geg6pe7zgtd47pij18599fs9ao ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"

Any ideas to what could cause this?

Adding here DEBUG logs:

warn [2022-10-27 15:44:42.487 +02:00] Unrecognized config permissions tag value. caller="api4/config.go:431" tag_value="sysconsole_write_*_read"
debug [2022-10-27 15:44:42.493 +02:00] Email batching job starting. Checking for pending emails periodically. caller="email/email_batching.go:89" interval_in_seconds=30
debug [2022-10-27 15:44:42.493 +02:00] Next run time for scheduler caller="jobs/schedulers.go:147" scheduler_name=migrations next_runtime="<nil>"
debug [2022-10-27 15:44:42.493 +02:00] Scheduler: isEnabled: false caller="last_accessible_post/scheduler.go:20" scheduler=last_accessible_post
debug [2022-10-27 15:44:42.493 +02:00] Scheduler: isEnabled: false caller="notify_admin/scheduler.go:20" scheduler=upgrade_notify_admin
debug [2022-10-27 15:44:42.495 +02:00] Not auto installing/upgrade because plugin was disabled caller="app/plugin.go:1021" plugin_id=com.mattermost.calls version=
debug [2022-10-27 15:44:42.498 +02:00] Next run time for scheduler caller="jobs/schedulers.go:147" scheduler_name=plugins next_runtime="2022-10-28 15:44:42.498385953 +0200 CEST m=+88985.262649098"
debug [2022-10-27 15:44:42.499 +02:00] Next run time for scheduler caller="jobs/schedulers.go:147" scheduler_name=export_delete next_runtime="2022-10-28 15:44:42.499318336 +0200 CEST m=+88985.263581484"
debug [2022-10-27 15:44:42.511 +02:00] Next run time for scheduler caller="jobs/schedulers.go:147" scheduler_name=product_notices next_runtime="2022-10-27 16:44:42.51195766 +0200 CEST m=+6185.276220807"
debug [2022-10-27 15:44:42.512 +02:00] Next run time for scheduler caller="jobs/schedulers.go:147" scheduler_name=import_delete next_runtime="2022-10-28 15:44:42.512934751 +0200 CEST m=+88985.277197897"
info [2022-10-27 15:44:42.512 +02:00] 2022/10/27 15:44:42 LoadPluginConfiguration API failed to unmarshal: json: cannot unmarshal string into Go struct field CustomAttribute.CustomAttributes.GroupIDs of type []string
caller="io/io.go:428" plugin_id=com.mattermost.custom-attributes source=plugin_stderr
debug [2022-10-27 15:44:42.512 +02:00] Scheduler: isEnabled: false caller="notify_admin/scheduler.go:20" scheduler=trial_notify_admin
info [2022-10-27 15:44:42.514 +02:00] 2022/10/27 15:44:42 LoadPluginConfiguration API failed to unmarshal: json: cannot unmarshal bool into Go struct field Configuration.EnableCodePreview of type string
caller="io/io.go:428" plugin_id=github source=plugin_stderr
debug [2022-10-27 15:44:42.519 +02:00] failed to fetch license twice. May incorrectly default to on-prem mode caller="app/plugin_api.go:968" plugin_id=com.mattermost.apps
debug [2022-10-27 15:44:42.519 +02:00] available upstream caller="app/plugin_api.go:968" plugin_id=com.mattermost.apps type=HTTP
debug [2022-10-27 15:44:42.519 +02:00] Skipped upstream: AWS Lambda: not configured. caller="app/plugin_api.go:968" plugin_id=com.mattermost.apps error="AWS credentials are not set: not found"
debug [2022-10-27 15:44:42.519 +02:00] available upstream caller="app/plugin_api.go:968" plugin_id=com.mattermost.apps type="Mattermost Plugin"
debug [2022-10-27 15:44:42.519 +02:00] Skipped upstream: OpenFaaS: not configured. caller="app/plugin_api.go:968" plugin_id=com.mattermost.apps error="OPENFAAS_URL environment variable must be defined: not found"
debug [2022-10-27 15:44:42.569 +02:00] Received HTTP request caller="web/handlers.go:165" method=PUT url=/api/v4/config request_id=89pj9ipsqbrqt8p75p6gs7n4ew status_code=200
warn [2022-10-27 15:44:42.668 +02:00] Error while populating webconn config caller="api4/websocket.go:58" id=undefined error="invalid connection id: undefined"
debug [2022-10-27 15:44:42.668 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/websocket request_id=nkyohn6ayind7n1hjxeknfodkw
debug [2022-10-27 15:44:42.812 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/posts/ghism4id9pbi5q8h35yxn867xw/thread request_id=py343sb1mbyazf8azc1bj5yggo status_code=304
error [2022-10-27 15:44:42.821 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=tq6bmsyym7ryjf7wyis4igpa7c ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:42.821 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=tq6bmsyym7ryjf7wyis4igpa7c status_code=500
error [2022-10-27 15:44:42.821 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=uuzeha9h3irj3rc48aa38erexc ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:42.821 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=uuzeha9h3irj3rc48aa38erexc status_code=500
debug [2022-10-27 15:44:42.824 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/channels/7gkkgstwhbbj9knia55apw9seo/posts request_id=3jtnxzqyzjbkigrudjkd1f97kh status_code=200
debug [2022-10-27 15:44:42.824 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/plugins/webapp request_id=bta6rn83h7gb8fmog3wozqqn1r status_code=200
debug [2022-10-27 15:44:42.825 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/unread request_id=qmsqrpf9hpdf9ggebwis3c9zgy status_code=200
debug [2022-10-27 15:44:42.858 +02:00] Received HTTP request caller="web/handlers.go:165" method=POST url=/api/v4/users/ids request_id=jya3dd5a63n97frqu13drin7fw status_code=200
debug [2022-10-27 15:44:42.888 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/plugins/webapp request_id=xa9bxz9iwf8eirk5s7cddpmbpw status_code=200
debug [2022-10-27 15:44:42.889 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/channels/7gkkgstwhbbj9knia55apw9seo/posts request_id=wu883m5njbgc5qbzwhtaogughe status_code=200
error [2022-10-27 15:44:42.890 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=ozsbt9jawffs781b99qwmuiexa ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:42.890 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=ozsbt9jawffs781b99qwmuiexa status_code=500
error [2022-10-27 15:44:42.890 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=z31ju7zthf83tbxqbja5z9ycbc ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:42.890 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=z31ju7zthf83tbxqbja5z9ycbc status_code=500
debug [2022-10-27 15:44:42.891 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/unread request_id=9a4zdb6m1irzzg1iwt8ar9ny6y status_code=200
debug [2022-10-27 15:44:42.924 +02:00] Received HTTP request caller="web/handlers.go:165" method=POST url=/api/v4/users/ids request_id=j7x6qwtnqinrjx87e585d1kjaw status_code=200
error [2022-10-27 15:44:42.943 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=w5tde64thfyujkz8upoyhwggpc ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:42.943 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=w5tde64thfyujkz8upoyhwggpc status_code=500
debug [2022-10-27 15:44:42.950 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/channels/7gkkgstwhbbj9knia55apw9seo/posts request_id=3w8k19gp4jrtdr76tzmhskgq6h status_code=200
error [2022-10-27 15:44:42.951 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=ejs87x99utraimp874zz4wuqdc ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:42.951 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=ejs87x99utraimp874zz4wuqdc status_code=500
debug [2022-10-27 15:44:42.954 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/plugins/webapp request_id=7upg96y6n38rupszbsxuzneemy status_code=200
debug [2022-10-27 15:44:42.954 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/unread request_id=633c96e4y3ghinzm5ps5azuh7c status_code=200
debug [2022-10-27 15:44:42.983 +02:00] Received HTTP request caller="web/handlers.go:165" method=POST url=/api/v4/users/ids request_id=o3dxpyeygib37yc371m9rjht5y status_code=200
error [2022-10-27 15:44:43.002 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=yshotnite3g17dy48xt87di57o ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:43.002 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=yshotnite3g17dy48xt87di57o status_code=500
error [2022-10-27 15:44:43.005 +02:00] Unable to get the channel members. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=x8ij4b6txfyppq8zyspmxu6sxw ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelMembersForUser http_code=500 error="GetChannelMembersForUser: Nu s-au putut obține membrii canalului., failed to find ChannelMembers data with teamId=nkpmw153s7gd8n9gksissstkea and userId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 12, name "MsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:43.005 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels/members request_id=x8ij4b6txfyppq8zyspmxu6sxw status_code=500
debug [2022-10-27 15:44:43.015 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/plugins/webapp request_id=di83gxdzcbbt5mogosw77spyso status_code=200
debug [2022-10-27 15:44:43.015 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/channels/7gkkgstwhbbj9knia55apw9seo/posts request_id=5z6xacwbfibz5r75f6rcc7bkdy status_code=200
debug [2022-10-27 15:44:43.015 +02:00] Denied due to throttling settings code=429 caller="app/ratelimit.go:88" key=18k3yzjshpr83chtiuna4kon5a
debug [2022-10-27 15:44:43.033 +02:00] Denied due to throttling settings code=429 caller="app/ratelimit.go:88" key=18k3yzjshpr83chtiuna4kon5a
debug [2022-10-27 15:44:43.033 +02:00] Denied due to throttling settings code=429 caller="app/ratelimit.go:88" key=18k3yzjshpr83chtiuna4kon5a
debug [2022-10-27 15:44:43.045 +02:00] Denied due to throttling settings code=429 caller="app/ratelimit.go:88" key=18k3yzjshpr83chtiuna4kon5a
debug [2022-10-27 15:44:43.045 +02:00] Denied due to throttling settings code=429 caller="app/ratelimit.go:88" key=18k3yzjshpr83chtiuna4kon5a
debug [2022-10-27 15:44:43.045 +02:00] Denied due to throttling settings code=429 caller="app/ratelimit.go:88" key=18k3yzjshpr83chtiuna4kon5a
error [2022-10-27 15:44:43.051 +02:00] Unable to get the channels. caller="web/context.go:117" path=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=tx937c6tc7rxdejnxkhmzct1jr ip_addr=172.17.88.2 user_id=48bbj6nc97f55npw6br7gxo96h method=GET err_where=GetChannelsForUser http_code=500 error="GetChannelsForUser: Nu pot obține canalele., failed to get channels with TeamId=nkpmw153s7gd8n9gksissstkea and UserId=48bbj6nc97f55npw6br7gxo96h: sql: Scan error on column index 17, name "TotalMsgCountRoot": converting NULL to int64 is unsupported"
debug [2022-10-27 15:44:43.051 +02:00] Received HTTP request caller="web/handlers.go:165" method=GET url=/api/v4/users/me/teams/nkpmw153s7gd8n9gksissstkea/channels request_id=tx937c6tc7rxdejnxkhmzct1jr status_code=500
debug [2022-10-27 15:44:43.059 +02:00] Denied due to throttling settings code=429 caller="app/ratelimit.go:88" key=18k3yzjshpr83chtiuna4kon5a
debug [2022-10-27 15:44:43.063 +02:00] Denied due to throttling settings code=429 

@amy.blais is someone who could help us get this up to date and working based on the errors we receive?

Hi UHLHosting,

you probably did make a too big jump during your upgrades. This usually happens when you are missing some database migrations. I did walk a user through this some time ago (if you’re already on the community server, you could check out this thread ).

You will need to fix these errors directly in your database, so please connect to it and run the following queries:

ALTER TABLE ChannelMembers ALTER COLUMN mentioncountroot SET DEFAULT '0'::bigint;
UPDATE ChannelMembers SET mentioncountroot=0 WHERE mentioncountroot IS NULL;
ALTER TABLE ChannelMembers ALTER COLUMN msgcountroot SET DEFAULT '0'::bigint;
UPDATE ChannelMembers SET msgcountroot=0 WHERE msgcountroot IS NULL;
ALTER TABLE Channels ALTER COLUMN totalmsgcountroot SET DEFAULT '0'::bigint;
UPDATE Channels SET totalmsgcountroot=0 WHERE totalmsgcountroot IS NULL;

Hi @agriesser

I have tried first query:

Database changed

mysql> ALTER TABLE ChannelMembers ALTER COLUMN mentioncountroot SET DEFAULT '0'::bigint;
ERROR 1064 (42000): 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 '::bigint' at line 1
mysql> ALTER TABLE ChannelMembers ALTER COLUMN mentioncountroot SET DEFAULT '0';
Query OK, 0 rows affected (0.03 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE ChannelMembers ALTER COLUMN mentioncountroot SET DEFAULT '0'::bigint;
ERROR 1064 (42000): 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 '::bigint' at line 1

Any ideas how to remediate it? It works without ::bigint part.

Hi again,

sorry, I assumed you’re on PostgreSQL.
If you’re on MySQL, the queries need to be different

ALTER TABLE ChannelMembers ALTER COLUMN mentioncountroot SET DEFAULT NULL;
UPDATE ChannelMembers SET mentioncountroot=0 WHERE mentioncountroot IS NULL;
ALTER TABLE ChannelMembers ALTER COLUMN msgcountroot SET DEFAULT NULL;
UPDATE ChannelMembers SET msgcountroot=0 WHERE msgcountroot IS NULL;
ALTER TABLE Channels ALTER COLUMN totalmsgcountroot SET DEFAULT NULL;
UPDATE Channels SET totalmsgcountroot=0 WHERE totalmsgcountroot IS NULL;