How to let mattermost fill Roles table once again?

Hey mattermoster,

As I wrote in my topic a few lines down I can’t update my existing 7.5.2 mattermost team edition because something should be wrong with one or more roles in roles table (maybe the playbook role entry).

Steps to reproduce
When I try to edit the system schema in the system console (check or uncheck any box) and try to save this, the following error occours in the log (i screwed up to “debug”):
{“timestamp”:“2023-02-18 09:38:03.283 +01:00”,“level”:“debug”,“msg”:“The role was not valid.”,“caller”:“web/context.go:113”,“path”:“/api/v4/roles/6kqwixe757dz7qbohbtfm4pwiy/patch”,“request_id”:“r9bfsza3bjbfzjsgt8q8pnc7tr”,“ip_addr”:“”,“user_id”:“nfyszaodh7ngdn1y5rgtuimtqa”,“method”:“PUT”,“err_where”:“UpdateRole”,“http_code”:400,“error”:“UpdateRole: Die Rolle war ungültig., invalid input: entity: Role field: value: &{6kqwixe757dz7qbohbtfm4pwiy playbook_admin authentication.Roles.playbook_admin.description 1643219482530 1651073532200 0 [playbook_private_manage_Roles playbook_private_manage_members playbook_private_manage_properties playbook_public_make_private playbook_public_manage_Roles playbook_public_manage_members playbook_public_manage_properties] true true}”}

And this happens even when I try to update mattermost to 7.7.1.
Now I consider to recreate the content of the table or recreate the table to let mattermost (7.5.2) renew the content but a simple deletion of the 22 lines and restart the mattermost service doesn’t fill the table.

How can I reach this?

Thank you guys.


Hey Micha,

you could try to run the mmctl integrity command, but according to the output on my system it doesn’t look like it checks the roles table. I’m not aware of a way to repropulate the database with predefined content, but I’d love to see the contents of your roles table to compare it with a vanilla 7.8.0 installation (if that’s the version you’re running on right now) to see what the difference could be.

Hey Alexander,

meanwhile I built a second vanilla 7.5.2 (same version as source) installation on a separate vm and started the mattermost service to create the tables and compare the two roles tables. The only difference was a 23th role (instead of 22 in source) named “custom_group_user” and - of course different id’s in the id field.