A new data structure was introduced in version 3.0.0 of the Jenkins Integration for Jira Server add-on. In this new data structure a custom primary key is used that had a string length constraint, and this constraint is not correctly mirrored by a foreign key relation.
This is a know issue of the ActiveObject framework this add-on is using (see AO-547), and the only solution is to remove the string length constraint on the primary keys.
Version 3.0.1 aims to solve this problem by removing the string length constraint on the primary keys used, but this may be blocked by the database system your Jira instance is connected to.
There is a workaround that allows you to fix the problem by resetting the ActiveObjects model upgrade marker in the database, triggering the upgrade tasks to be executed again when Jira is started. This second run should then complete the model migration.
You will require database access in order to use this workaround!
To fix this you will need to manually change the data within the database to correct the site data.
- Shutdown Jira
- Connect to you Jira database using your favourite SQL tooling that is also appropriate for the database you have.
- Create a backup of your database!
- Once connected locate the table
AO_[HASH]_SITE_MAPPING, there should only be a single table that matches this name.
- Note the table hash
HASH, for example
3FB43F, since we will be needing this
- Drop the tables of the new data model, these include:
Next we may need to reset the Active Objects upgrade marker for the plugin. First execute the first query below to see if there is a marker for this Active Objects module. If there is then note the ID and execute the second query as well.
SELECT * FROM PROPERTYENTRY WHERE PROPERTY_KEY = 'AO_[HASH]_#'
UPDATE PROPERTYSTRING SET PROPERTYVALUE = '0' WHERE ID = [ID]
- The data model has now been reset, and Jira can be started again.
- If the add-on was still installed and enabled, then the upgrade of the model should kick-in automatically, otherwise you can install, or enable, the add-on with Jira to trigger the data model upgrade.