Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How to repair Insight

Edited

Insight was mistakenly upgraded past version 8.4 without running the steps at https://confluence.atlassian.com/insightapps/preparing-for-insight-8-4-1085180929.html.

Subsequently, the instructions under section "

What if I upgraded to 8.4.X without executing the Database changes by accident?" at

https://confluence.atlassian.com/insightapps/insight-8-4-faqs-1085180949.html were followed. The section's first instruction is to uninstall Insight. This was done and the first  SQL query was run agains MySQL 5.7

ALTER TABLE AO_8542F1_IFJ_OBJ_ATTR_VAL DROP CONSTRAINT fk_ao_8542f1_ifj_obj_attr_val_object_attribute_id;

 

Then the next command was run (it says postgres syntax but it worked for mysql, apparently)

UPDATE propertystring SET propertyvalue = '75' WHERE id = ( SELECT id FROM propertyentry WHERE property_key = 'com.riadalabs.jira.plugins.insight:build');

 

I then installed the latest version of Insight by uploading it (could not install it thought the marketplace)

Finally, ran the command

ALTER TABLE AO_8542F1_IFJ_OBJ_ATTR_VAL ADD CONSTRAINT fk_ao_8542f1_ifj_obj_attr_val_object_attribute_id
FOREIGN KEY (OBJECT_ATTRIBUTE_ID) REFERENCES AO_8542F1_IFJ_OBJ_ATTR (ID);

But received the error

ERROR 1022 (23000): Can't write; duplicate key in table '#sql-9ec8_126fa'

Currently Insight does not recognize any of the existing objects or object schemas

1 answer

0 votes
Mikael Sandberg Community Leader Dec 02, 2021

You can download an earlier version of the app from Marketplace, then upload that version of the jar file manually. Since this version of Insight made data structure changes based on the commands you ran, you may want to contact Atlassian support first just to verify that the downgrade will work. Also check out this KB, Downgrading an Add-on to an Earlier Version 

Thank you for the reply. I've reached out to Atlassian to ensure i don't (further) bork the database.

Like Mikael Sandberg likes this

Suggest an answer

Log in or Sign up to answer
TAGS

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