Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Error during DB upgrade (2.0.x -> 3.5.1)

migration

Hi, I'm trying to update a gemini 2.0.x database to version 3.5.1.

I'm getting the follwing error when running the script Upgradev3-0-Step1.sql:

(7 row(s) affected)
Msg 547, Level 16, State 0, Line 181
The INSERT statement conflicted with the FOREIGN KEY constraint "gemini
issueworkflowitemtransitionissueworkflowitemidfk". The conflict occurred in database "GEMINI3", table "dbo.geminiissueworkflowitem", column 'issueworkflowitemid'.
The statement has been terminated.

(5 row(s) affected)
Before that script, I was executing the following scripts (without errors):
  • Upgrade-v2-1.sql
  • Upgrade-v2-2.sql
  • CreateTables.sql
  • CreateViews.sql
  • CreateProcs.sql
How should I proceed?

Thanks a lot.

mbischoff
· 1
mbischoff
Replies (9)
helpful
0
not helpful

Please check the issuestatetransitionlut table and make sure that all statuses exist in the issuestatuslut table


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Since the problem seems to be related to the issue states and -transitions, please find below the contents of the two tables:


EDIT: deleted the tables, since they messed up the forum's layout.


mbischoff
· 1
mbischoff
helpful
0
not helpful

Thanks for the quick answer. There is one entry in the issuetransitionlut with id 7, but no corresponding entry in issuestatuslut.

Should I delete this entry?


mbischoff
· 1
mbischoff
helpful
0
not helpful

If you look at the first column of each table the values should match, but you have statusid of 7 in the transition lut. Remove this record and all should be ok.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Thanks, it seems to work now.

BTW: the upgrade scripts Upgradev3-0-1.sql and Upgradev3-0-Step3_Optional.sql are not mentioned in the migration guide.

What is their purpose and should they be executed?


mbischoff
· 1
mbischoff
helpful
0
not helpful

I think you meant step 2, correct?

step 2 will try and migrate your security settings but we advise to do it from scratch.

Step 3 will drop all old gemini tables to save space.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

No I meant exactly the two scripts that I mentioned (these are part of the 3.5.1 installation kit).

  • Upgradev3-0-Step2.sql is mentioned in the migration guide (it is recommended to not run it).
  • Upgradev3-0-Step3Optional.sql is not mentioned in the migration guide (but you explained it)
  • Upgradev3-0-1.sql is not mentioned in the migration guide. The comment in the file says that it's a patch 3.0.1. It adds a column viewtype to gemini_userissueviews.
    --> I guess I have to execute it?


mbischoff
· 1
mbischoff
helpful
0
not helpful

Opps, sorry, 3.0.1 is for users who upgrade from 3.0.0 only.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Thanks a lot for your support!


mbischoff
· 1
mbischoff