Reverted migration from v5 broke admin user

System Information
  • Strapi Version: 4.15
  • Database: mysql
  • Node Version: 20.18

I tried to update to Strapi v5, but had to revert it back to 4.15. But after the revert, I can still log in to the admin, but dont have access to anything. Content manager says “You don’t have the permissions to access that content” even when my user is super admin. My app calling admin suddenly gets 401 Unauthorized.
/users/me/permissions returns empty array not sure if that means anything.
/users/me returns
{
“data”: {
“id”: 1,
“firstname”: “O”,
“lastname”: “U”,
“username”: null,
“email”: “someemail@gmail.com”,
“isActive”: true,
“blocked”: false,
“preferedLanguage”: null,
“createdAt”: “2023-10-29T14:01:39.807Z”,
“updatedAt”: “2023-10-29T14:01:39.807Z”,
“roles”:
}
}
admin_users still has two admin user as it is supposed to have. But select * from admin_users_roles_links; returns
Empty set (0.00 sec)

not sure what more is relevant. Im kinda confused as per what changed in the DB and caused this. I checked the data in CMS and its still there. So it must be something user related. Anybody similar experience or an idea what to do/try?

Thanks a ton!

UPDATE: Ok so it seems that there are several changes in permissions tables and I ofc did the backup of the data tables, but not all the tables since it didnt cross my mind this could happen. So I guess options are, try to manually set all needed relations in those tables, but that would be miracle. Or try to delete all users if it allows me to create new admin, but also not sure…