How to repair Insight

Sean M December 2, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 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 

Sean M December 2, 2021

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