Hi,
I have a scenario in my application and that is.
Tables
Permissions | Permission Group | Assigned Permissions
1 - Permissions
I have simply listed all permissions e.g permission name (Create User)
2- Permission Group
In this table, I have 2 columns one permission JSON column and the second group_name column where I am storing all group names like Suppliers, sellers, etc the second column I am storing data in JSON which is all permissions that will be assigned to the new group.
3 - Assigned Permissions
Here I am storing user_id, permission_id and group_id
Now I want when the ``Permission Group tableto update the related data which is in theAssigned Permissionstable will update For example, I have group nameAdminwith permission 1 , 2 3 , if I add groupAdminto userAsystem will store 1,2,3permissionsin theAssigned Permissions table, Now If a user updates the group and attach new permession from 1,2,3 to 8,5,6 then Assigned permission table` will update and remove permission 1,2,3 and create a new record which is 8,5,6 how can I do this
I hope this is understandable :)