Page 1 of 1

Update user group name

PostPosted: Mon May 21, 2018 9:57 am
by davide.filippi
Hi All,
I need to update the name of an user group. If I simply change the name from USER GROUP / [name of group], users in that group doesn't update their user group automatically. Is there some trick or I need to search in database all columns named "user_group" and update table by table?

Vicidial VERSION: 2.14-662a - BUILD: 180306-1718

Thanks for the reply

Re: Update user group name

PostPosted: Mon May 21, 2018 12:45 pm
by MJCoate
Correct, you'd have to update them in the DB manually.

Re: Update user group name

PostPosted: Wed May 30, 2018 9:58 am
by davide.filippi
Hi all,
I did it.

First of all check which table you have to update. Go in "information_schema" database, "COLUMN" table and execute
SELECT * from COLUMNS where table_schema = "yourasteriskdb" and column_name = "user_group". This show you all tables contains user_group field.

After this you can execute for all tables you found in the first step
update [one of the table found in the previous step] set user_group = "NewUserGroup" where user_group = "OldUserGroup"

Hope this can help.

Regards