Yes, you can do this, but you REALLY do not want to do it this way.
The process is
Are you really sure this is the best option? When you could do it perfectly safely and without taking anything offline via the UI, or REST?
Is it possible to insert straight into the database? Yes, it's always possible to add data into a database. I'd personally advice against it.
If changes are to be made programatically I'd do it via REST API instead of straight into a database.
If I was in your situation, I'd go back to the team and explain why this is a terrible idea.
This would result in downtime of the application for each user insert, risk of inconsistencies, and the need for a complete rollback of the database for any issue.
Is it a recurring task that needs to be done often?
Is it many users at the time?
In case you really want to risk your database and accept downtime every update then go ahead and knock yourself out with the developer reference material https://developer.atlassian.com/server/jira/platform/database-user-and-group-tables/#group-membership to try to find all the right references in the DB.
Doing this via API would get the right info into the right place, it would enable changes to be done without downtime.
Your team are wrong, there's no nice way to put that. I would want to question why they think they want to do this in such a bad way.
Tell them what I said above, tell them that it's a long, painful and risky thing to do and leaves them unsupported. Tell them that if (when) it goes wrong, they're going to be blamed for the data loss and the loss of time when you have to roll back. Plus the cost of the time you're wasting having to ask for more here, plus all the time you'll need to write, test and fully understand all the SQL you'll have to write.
Point out that there are fully supported, safe, documented ways of doing this in a couple of lines of code without having 8 hour downtime windows.
G’day Bamboo customers, As we approach GA for Bamboo Data Center , we would like to inform you that the Data Center Apps Program for Bamboo starts this quarter. How long does it take? We are g...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events