Details
-
Bug
-
Resolution: Obsolete
-
Low
-
None
-
6.1.2
-
None
-
6.01
-
Description
To reproduce:
- Install JIRA with GH 5.10.6 to MSSQL
- Create a new schema in the same database (other than dbo)
- Install JIRA with GH 5.10.6 to the new MSSQL database
- Upgrade the second JIRA to GH 6.1.2
- Attempt to index
When upgrading from 5.10.6, GH checked for the DEFAULT constraints on several tables and found them to exist. When trying to delete the constraints that it had found, GH specified the incorrect schema name. Upon further research, it seems the check to find the constraint:
SELECT 1 FROM SYS.OBJECTS WHERE NAME = 'df_AO_60DB71_ISSUERANKING_CUSTOM_FIELD_ID'
in a way that will return true for any schema name. In scenarios where there are multiple JIRA databases in the same MSSQL instance, this returns true for a different schema, causing AO to try to remove the constraint, doing so by specifying the working (but incorrect) schema.
java.sql.SQLException: 'df_AO_60DB71_ISSUERANKING_CUSTOM_FIELD_ID' is not a constraint.
It's all downhill from there.
IssueIndexer:thread-9 WARN anonymous 1021x18x1 1e83i9s 10.12.216.81 /secure/SetupImport.jspa [java.ao.db.SQLServerDatabaseProvider] Error in schema creation: 'df_AO_60DB71_COLUMNSTATUS_POS' is not a constraint.; attempting to roll back last partially generated table
Resolution
To overcome this issue, use the following steps:
- Start with a clean, pre-upgrade backup of your JIRA
- Ensure that there is no GreenHopper artifact in <jira-home>/plugins/installed-plugins
- Ensure that your working database schema is totally empty (for best results, drop it and create a new schema)
- Restore the XML backup using JIRA
- Stop JIRA
- Remove the constraints:
'df_AO_60DB71_COLUMN_POS' 'df_AO_60DB71_COLUMNSTATUS_POS' 'df_AO_60DB71_ISSUERANKING_CUSTOM_FIELD_ID' 'df_AO_60DB71_ISSUERANKING_ISSUE_ID' 'df_AO_60DB71_QUICKFILTER_POS' 'df_AO_60DB71_SPRINTMARKER_ID' 'df_AO_60DB71_SWIMLANE_POS'
- Start JIRA
- Install GreenHopper 6.1.2 or later
Attachments
Issue Links
- references
-
AO-409 Loading...