I have seen seen a number of errors like this recently:
java.sql.SQLException: Cannot change column 'OBJECT_ATTRIBUTE_ID': used in a foreign key constraint 'fk_ao_8542f1_ifj_obj_attr_val_object_attribute_id'
OR
java.sql.SQLException: Cannot change column 'ID': used in a foreign key constraint 'fk_ao_589059_audit_item_asc_item_audit_item_id' of table 'jiradb.AO_589059_AUDIT_ITEM_ASC_ITEM'
I would fix the first error with 2 alter tables commands:
- ALTER TABLE AO_8542F1_IFJ_OBJ_ATTR_VAL DROP FOREIGN KEY fk_ao_8542f1_ifj_obj_attr_val_object_attribute_id;
- RESTART JIRA.
- 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);
I would fix the 2nd error with 2 more command:
- ALTER TABLE AO_589059_AUDIT_ITEM_ASC_ITEM DROP FOREIGN KEY fk_ao_589059_audit_item_asc_item_audit_item_id;
- RESTART JIRA
- ALTER TABLE AO_589059_AUDIT_ITEM_ASC_ITEM ADD CONSTRAINT fk_ao_589059_audit_item_asc_item_audit_item_id
FOREIGN KEY (AUDIT_ITEM_ID) REFERENCES AO_589059_AUDIT_ITEM(ID);
I kept going like this a few more times because there was one new SQLException come up each time I restarted Jira. Can anyone tell me what is wrong?
PS. I have created a support zip file, but this form does not allow attachment.