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.




Upgrade from V2.0.3 to v2.2.7

web-app

I'm using V2.0.3 and want finally upgrade to v3.0.4.  As in the Installation Guide for 3.0.4 (page 8, bullet #7) indicates I need to upgrade my DB to release 2.2.7 before upgrading to release 3.0 (I assume from 2.2.7 I can upgrade directly to 3.0.4, please correct me if my assumption is wrong).

Now, I got confused with reading bullet #8, page 9 of Installation Guide for 3.0.4.  Bullet 8.5, v2.2 <-- I assume that means if you want to upgrade to release 2.2 read bullet 8.5 (page 10).  Right below that section, it said "please download and review the "Gemini Migration Guide" document.  Thus, I download the 3.0 Migration Guide.

I assume I should follow the instruction on page 5 of 3.0 Migration Guide. On that page, it doesn't tell me specifically that I need to download so and so file in order to upgrade to release 2.2.  Bullet 5 it just tells me to execute 3 scripts, where are they and how can i get them? Excuse my questions if you think they are silly.  It's my first time messing with Gemini.  I'm not even familiar with using it, but I'm having a task that I need to upgrade it. 

Any help (please be specific and details since i'm so new to this product) would be highly appreciated.  If I need to provide more information, please let me know :)

Thanks!!
Kim




kha
· 1
kha
Replies (21)
helpful
0
not helpful

All you have to do is download 3.0.4 (zip). Unzip it and go to the databae upgrade folder. You will need to execute 2.1 and 2.2 sql scripts. After that run create tables (from the parent dir) followed by Upgradev3-0-Step1.sql and Upgradev3-0-Step2.sql if all is ok, run create_views and procs.sql.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Thanks, Mark!


kha
· 1
kha
helpful
0
not helpful

Now I got some foreign key conflict error with executing the upgradev3-0-step1.sql script.  The Migrate document, page 5 already have the Note about these kind of error.  But doesn't say the way to resolve the problem.  Any help is really appreciated.

(15 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 "Gemini", table "dbo.geminiissueworkflowitem", column 'issueworkflowitemid'.
The statement has been terminated.

(0 row(s) affected)
Msg 547, Level 16, State 0, Line 281
The INSERT statement conflicted with the FOREIGN KEY constraint "gemini
issuehistoryprojectidfk". The conflict occurred in database "Gemini", table "dbo.geminiprojects", column 'projectid'.
The statement has been terminated.

(0 row(s) affected)
Msg 547, Level 16, State 0, Line 318
The INSERT statement conflicted with the FOREIGN KEY constraint "gemini
issuecomponentscomponentidfk". The conflict occurred in database "Gemini", table "dbo.gemini_components", column 'componentid'.
The statement has been terminated.


kha
· 1
kha
helpful
0
not helpful

The last 2 errors are due to projectid in the issuehistory table not being a valid id, suggest you remove these records from the history tabel. Similar issue with component, you have some components in the issues table that do not exist, excldue these issues or update them to a valid component.

As for the workflow issue, can you post your current workflow?

 


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Regarding to the component error above, my original dbo.component table doesn't have userid field, but the dbo.gemini_component has userid field, so it automatically has the -1 value assigned to that field for all records.  Is it something expected?  Will it cause any problem moving forward?

Here is my current issue workflow screenshot:


kha
· 1
kha
helpful
0
not helpful

Regarding to the component error above, my original dbo.component table doesn't have userid field, but the dbo.gemini_component has userid field, so it automatically has the -1 value assigned to that field for all records.  Is it something expected?  Will it cause any problem moving forword?


kha
· 1
kha
helpful
0
not helpful

Make suer that your statuses in the issuestatetransitionlut are valid (status and otherstate).


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I just restored my latest gemini db, and reran the createtables.sql script, it gave me the following error:

Msg 3705, Level 16, State 1, Line 17
Cannot use DROP TABLE with 'gemini
issuelinktypes' because 'geminiissuelinktypes' is a procedure. Use DROP PROCEDURE.

(1 row(s) affected)
Msg 2714, Level 16, State 6, Line 141
There is already an object named 'gemini
issuelinktypes' in the database.

I don't see the geminiissuelinktypes table anywhere, only dbo.issuelinktypes exists (it was there b4 i ran the createtables.sql script)


kha
· 1
kha
helpful
0
not helpful

I fixed the problem by changing the line 17 in the script to DROP PROCEDURE as the first error said, it got rid of both errors and gemini_issuelinktypes table got created afterward.

I don't know if it is the right change and if that change might make something work incorrectly or inconsistently later on.  Any idea or comment?


kha
· 1
kha
helpful
0
not helpful

I'm moving on with upgrade_v3-0-step1.sql and got the following errors:

Msg 207, Level 16, State 1, Line 49
Invalid column name 'comment'.
Msg 207, Level 16, State 1, Line 49
Invalid column name 'active'.
Msg 207, Level 16, State 1, Line 205
Invalid column name 'resourcemode'.
Msg 207, Level 16, State 1, Line 205
Invalid column name 'componentmode'.
Msg 207, Level 16, State 1, Line 212
Invalid column name 'rowid'.
Msg 207, Level 16, State 1, Line 261
Invalid column name 'resolveddate'.
Msg 207, Level 16, State 1, Line 261
Invalid column name 'closeddate'.
Msg 207, Level 16, State 1, Line 386
Invalid column name 'projids'.
Msg 207, Level 16, State 1, Line 386
Invalid column name 'affectedversions'.


I noticed that all these column names are added by the script because the original tables don't have these column names.


kha
· 1
kha
helpful
0
not helpful

What is the version of the restored database? Seems like it is not 2.2.7!


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Sorry, I didn't make myself clear at the first time.

The db is from gemini 2.0.3 and restored to gemini 3.0.4 db

I ignored those invalid column name and executed the step2 script without any error. However, the gemini_users doesn't have enough data as in users table.


kha
· 1
kha
helpful
0
not helpful

Step 1 of the 3.0.0 upgrade moves all the data to the new structure. Was this run successfully?

Are all the issues there for 3.0.4? Comments?

If yes, then just re-run the statment to move the users.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I started from page 5 (bullet 5) of Gemini Migration Guide document

  • Execute database schema scripts
    • Createtables.sql ran with the following error:
      Msg 3705, Level 16, State 1, Line 17
      Cannot use DROP TABLE with 'gemini
      issuelinktypes' because 'geminiissuelinktypes' is a procedure. Use DROP PROCEDURE.

      (1 row(s) affected)
      Msg 2714, Level 16, State 6, Line 141
      There is already an object named 'gemini
      issuelinktypes' in the database.

      I fixed the problem my changed the line 17 in the script to DROP PROCEDURE reran the script, and both above errors didn't appear again.  No other error.
    • Createviews.sql ran successfully w/o error
    • Createprocs.sql ran successfully w/o error

  • Execute data migration scripts:
    • Upgradev3-0-step1.sql gave me the invalid column names as I posted above
    • I ignored those errors from executing upgradev3-0-step1.sql script, and moved on with step2 script.  I didn't get any error from the first execution of step2 script, but the geminiusers table doesn't have enough data copied over from users table.  I executed the step2 script again to see if it makes any difference, it gave me the errors:

      Msg 4701, Level 16, State 1, Line 9
      Cannot find the object "gemini
      usersettings" because it does not exist or you do not have permissions.
      Msg 208, Level 16, State 1, Line 26
      Invalid object name 'geminiglobalgroups'.
      Msg 208, Level 16, State 1, Line 3
      Invalid object name 'gemini
      projects'.
      Msg 208, Level 16, State 1, Line 3
      Invalid object name 'geminiprojects'.
      Msg 208, Level 16, State 1, Line 3
      Invalid object name 'securityschemes'.
      Msg 208, Level 16, State 1, Line 5
      Invalid object name 'userroles'.
      Msg 208, Level 16, State 1, Line 2
      Invalid object name 'Migration30
      TempGroups1'.
      Msg 208, Level 16, State 1, Line 3
      Invalid object name 'Migration30TempGroups1'.
      Msg 208, Level 16, State 1, Line 3
      Invalid object name 'Migration30
      TempGroups1'.
      Msg 208, Level 16, State 1, Line 3
      Invalid object name 'Migration30TempGroups1'.
      Msg 208, Level 16, State 1, Line 8
      Invalid object name 'gemini
      issues'.
      Msg 208, Level 16, State 1, Line 1
      Invalid object name 'geminiissues'.
      Msg 208, Level 16, State 1, Line 1
      Invalid object name 'gemini
      issuecomments'.
      Msg 208, Level 16, State 1, Line 5
      Invalid object name 'geminiprojects'.

Also, the data from original tables didn't get copied over to geminixxx tables at all (i.e gemini_projects table has no record in there while projects table has a lot records)


kha
· 1
kha
helpful
0
not helpful

From the errors I see, it seems that you are trying to upgrade a 2.0.x database directly to 3.0.4, which can not be done!

You need to run the upgrdae scripts first:

  • Upgradev2-1.sql (this script should drop the procedure 'geminiissuelinktypes'
  • Upgrade_v2-2.sql

After these have run, run the upgrdae to 3.0 scripts.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

can i call you to get help from this, i am getting more and more weird errors

well, let me try to use the 2 version script first and we'll see.  I think i messed up  because of skipping 2 version scripts


kha
· 1
kha
helpful
0
not helpful

Now, i deleted the existing db, restored the v2.0.3 db again to sql2005 server

I know the steps now:

1) Run Upgrade-v2-1.sql
2) Run Upgrade-v2-2.sql
3) Run CreateTables.sql
4) Run Create
Views.sql
5) Run Create_Procs.sql
6) Run Upgrade-v3-0-step1.sql
7) Run Upgrade-v3-0-step2.sql


kha
· 1
kha
helpful
0
not helpful

I'm getting this error from executing the upgrade-v3-0-step1.sql

(53 row(s) affected)
Msg 208, Level 16, State 1, Line 16
Invalid object name 'geminiappsettings'.

Do we have such thing as geminiappsettings?


kha
· 1
kha
helpful
0
not helpful

Yes, this gets created when running the 2.1 script!

Make sure that you are using the same user to execute all scripts.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I'm seeing this error with executing the Upgrade-v3-0-step1.sql  The original issues table doesn't have issuetypeid column

The DELETE statement conflicted with the REFERENCE constraint "geminiissuesissuetypeidfk". The conflict occurred in database "Gemini", table "dbo.geminiissues", column 'issuetypeid'.



kha
· 1
kha
helpful
0
not helpful

You have some issues with type id that does not exist in the issuetypes table. Suggest you find these and update them to use a valid type before running the script.


Saar Cohen
· 5000
Saar Cohen