opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
136 stars 34 forks source link

User groups disappear while upgrading to v19.0.0 #183

Open plotnikovanton opened 4 months ago

plotnikovanton commented 4 months ago

Hello. I have ONA v18.1.1 installed on Debian 11. There are several custom groups (admins, operators, etc.) with different permissions. They listed in 'Menu -> Admin -> Manage groups' along with default groups (Admin and Default). Also they listed in 'Menu -> Admin -> Manage users -> Edit user'

After upgrade ONA to v.19.0.0 (with no errors) all custom groups disappear from those menus. I've also noticed, that couple of new tables is created in DB. One of them is 'auth_groups' where new groups now lives, but only Admin and Default. Others are lost. If i create new group it appears in 'auth_group' table, but not in old one 'groups' which still exists.

Is there the correct way to upgrade to v19.0.0 without losing custom groups? Thanks in advance!

HugoTH85 commented 4 months ago

Hi ! I had a similar issue before when I was upgrading from v13.03.01 to v19.0.1 It came from the MySQL database : if you didn't have modified your database, I think you should have a table named "groups". This table must be renamed "auth_groups" to become usable. I'm not sure if this could be the origin of your problem, as I don't know the exact release this patch has been introduced (maybe the table "auth_groups" is already set up for v18.1.1), but I hope this will resolve your issue :)

mattpascoe commented 3 months ago

@plotnikovanton As @HugoTH85 points out, the issue is that the table name has changed. The current state of the auto upgrade process is that it does not actually move the old table, it just creates a new one. You should be able to rename the old "groups" table to "auth_groups" and things should continue to function as they did.

This could have been handled a bit better for sure.

plotnikovanton commented 3 months ago

That did the trick. Thank you @HugoTH85 and @mattpascoe for the explanation. Should i close the issue or leave it here as prompt for other ONA users?