Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Need help coverting PostgreSQL query to MySQL query from Atlassian document

I'm looking at the document that is called: How to merge two users' content ownership and permissions in Jira


If you look at Step 4, there are lot of queries that are written in PostgreSQL.

Our company is using MySQL and I'm not sure how to run some of queries in MySQL language.

Here are the queries that I'm struggling with:

update userassociation set source_name = tmp_app_user_migration.new_user_key from tmp_app_user_migration where source_name = tmp_app_user_migration.old_user_key
and sink_node_id not in (select U1.sink_node_id from userassociation U1, userassociation U2 
where U1.source_name = tmp_app_user_migration.old_user_key and U2.source_name = tmp_app_user_migration.new_user_key and
U2.sink_node_id = U1.sink_node_id);


update userhistoryitem set username = tmp_app_user_migration.new_user_key from tmp_app_user_migration where username = tmp_app_user_migration.old_user_key
and entityid not in (select U1.entityid from userhistoryitem U1, userhistoryitem U2 
where U1.username = tmp_app_user_migration.old_user_key and U2.username = tmp_app_user_migration.new_user_key
and U2.entityid = U1.entityid and U2.entitytype = U1.entitytype);


Can anyone help me with this?

1 answer

Hi @Jung-Whan Cho,

Those SQLs looks like they are compatible with MySQL as well, can I know if you are having any errors executing those SQLs?


I'm getting syntax error of executing those in MySQL.

I got supported from Atlassian support team so I'm good.

Thanks for the update @Jung-Whan Cho. It would have been helpful if you had provided the syntax error for troubleshooting.

Anyway, glad to know that it's resolved!

Suggest an answer

Log in or Sign up to answer

Community Events

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

Events near you