Upgrade fails

Topics: Installing BugNET
Dec 10, 2014 at 11:38 PM
Hi, we're currently running v 1.6.313 and trying to upgrade to the latest version. For some reason the upgrade of the database fails which then starts causing all kinds of errors. The Install.aspx page reports many errors like these.

Current Database Version: 1.0.0.0
00:00:00.0060000 - Upgrading To Version: 1.6.315.0
00:00:00.0150000 - Creating Custom Field Views
00:00:00.2810000 - Custom fields created!
00:00:00.2850000 - Executing Script: 0.7.719.0.SqlDataProvider.sql Error!
Error Details
File 0.7.719.0.SqlDataProvider.sql
Error Cannot find the object "dbo.Bug" because it does not exist or you do not have permissions.


00:00:00.3090000 - Executing Script: 0.7.820.0.SqlDataProvider.sql Error!
Error Details
File 0.7.820.0.SqlDataProvider.sql
Error Cannot find the object "dbo.ProjectRoles" because it does not exist or you do not have permissions.


00:00:00.3260000 - Executing Script: 0.7.832.0.SqlDataProvider.sql Error!
Error Details
File 0.7.832.0.SqlDataProvider.sql
Error Invalid object name 'HostSettings'. Updating Host Settings


00:00:00.3300000 - Executing Script: 0.7.854.0.SqlDataProvider.sql Error!
Error Details
File 0.7.854.0.SqlDataProvider.sql
Error Operand type clash: uniqueidentifier is incompatible with int Invalid column name 'ProjectId'.


00:00:00.3460000 - Executing Script: 0.7.880.0.SqlDataProvider.sql Error!

And meany more. How do I get the upgrade to work properly? I've tried running it several times. I've tried downloading the intermediary version to attempt 1 upgrade at a time, but there's been no luck. I backed up the DB prior to the upgrade so I restore it each time before my next attempt but it's simply not working. Is there something I am missing?
Dec 11, 2014 at 7:33 PM
Looks like your database version is 1.0.0.0 not 1.6.313 as it should be if you are running that version. You can update this in the HostSetttings table.
Dec 11, 2014 at 9:45 PM
It's possible we're on an older version. The binaries say 1.0.0.0. Is there a definitive way to determine which version is running if the binaries do not specify?
Dec 13, 2014 at 12:06 AM
I was finally able to figure out that the database should have been at 1.6.307. My best guess is that a person in the past that maintained it had a failed upgrade along the way. There were several missing stored procedures, a missing constraint and of course the database did not have anything close to the correct version number saved within.

After figuring all of those out and manually applying them prior to the update, everything worked like a charm.