1.4 to 1.5 upgrade issues: foreign key/ email.

Topics: Installing BugNET
Aug 27, 2013 at 5:22 PM
Steps to repeat
(1) Unzip 1.5 into folder alongside 1.4.
(2) Stop 1.4 website.
(3) Backup database.
(4) Edit connection string in 1.5 system to match that in 1.4 system.
(5) Start up 1.5 website. .... it upgrades the database and says all is well.
(6) Attempt to log in, which fails. No surprise as I had read the release notes.
(7) Attempt to reset my password from home screen... YSOD with
"Column 'passwordVericationToken' required for property 'PasswordVerificationTolen. was not found in table 'BugNet_UserProfiles'."
(8) Regress to 1.4.

Looks like I can upgrade it to 1.5 but I can't get into the resulting installation. Did I mis something or does this need a fix?
Aug 27, 2013 at 5:33 PM
philw wrote:
Steps to repeat
(1) Unzip 1.5 into folder alongside 1.4.
(2) Stop 1.4 website.
(3) Backup database.
(4) Edit connection string in 1.5 system to match that in 1.4 system.
(5) Start up 1.5 website. .... it upgrades the database and says all is well.
(6) Attempt to log in, which fails. No surprise as I had read the release notes.
(7) Attempt to reset my password from home screen... YSOD with
"Column 'passwordVericationToken' required for property 'PasswordVerificationTolen. was not found in table 'BugNet_UserProfiles'."
(8) Regress to 1.4.

Looks like I can upgrade it to 1.5 but I can't get into the resulting installation. Did I mis something or does this need a fix?
Download the install package again if you haven't already today. There was an update early this morning. I am assuming you have a typo with PasswordVerification__Token__ ?

The upgrade script adds this column if it completes successfully.
Aug 27, 2013 at 5:47 PM
Thanks - I just downloaded it about 30 minutes before posting, although I don't have the precise version number here as I've no longer access to that machine today I'm afraid. I don't think I mistyped anything, but I did have to copy from a screen grab. I'm pretty sure there were no underscores there.

I can try again tomorrow. I assume the new download has a different version number, so I will tomorrow be able to confirm which one just failed for me...
Aug 27, 2013 at 6:12 PM
Edited Aug 27, 2013 at 6:21 PM
philw wrote:
Thanks - I just downloaded it about 30 minutes before posting, although I don't have the precise version number here as I've no longer access to that machine today I'm afraid. I don't think I mistyped anything, but I did have to copy from a screen grab. I'm pretty sure there were no underscores there.

I can try again tomorrow. I assume the new download has a different version number, so I will tomorrow be able to confirm which one just failed for me...
The underscores were suppose to be bold from codeplex formatting. If you got it about 30 minutes ago you should be ok so I am not sure why the installation didn't add that column.

The updated version is the same , but the file date will be different.
Aug 27, 2013 at 8:12 PM
I just attempted an upgrade with a package freshly downloaded and it still fails.

I managed to get it working by manually executing 1.5.528.0.SqlDataProvider.sql on a v1.4 database restored.
The install/install.aspx then still reports to have (further?) upgraded the DB (while I was expecting it to reply to me the DB was already upgraded).
But now it seems to work.

Ideas?
Aug 27, 2013 at 9:07 PM
Edited Aug 27, 2013 at 9:09 PM
Hmmm I am not to sure. The installation also updates the version number so that is possible what is happening after the fact.

Do you have any specifics on what errors occurred running the install normally?

I will also investigate further this evening and see if additional changes are necessary.
Aug 28, 2013 at 2:10 AM
The error has been fixed now and the package has been updated. Please re-download the package and run the upgrade from version 1.4 again.

Thanks.
Aug 28, 2013 at 9:38 AM
I downloaded a second time this morning - same version number, dates look the same, hard to be sure which is which.

However the upgrade basically worked with two errors:
  1. Last time the upgrade script ran without any errors. This time I recieved the error below. I wasn't sure if it's fatal, so I continued on and it seems ok, but would suggest some underlying issue with the integrity of my database. Any suggestions on how to trace this down? If there's something which is duplicated which isn't allowed, I'd rather delete the offending items and put whatever constraint this is trying to apply in there. Bear in mind I've been using BugNet for quite a while so it could be that this is something carried over from a long-past defect.
  2. As expected my password was trash, but the "send me a reset link" feature worked this time and I got back in. There's one defect in that though, which is that the link emailed to me was (I edited the token a bit):
    http://192.168.1.15:8080Account/PasswordReset.aspx?token=LCEhZxxx4aIxPV05-tQzBw2
    You will note that after the IP address and port number there is no slash in the text or the href for it. If you click it, then manually insert the slash, it works ok.
So I think I have a functional 1.5 system, albeit with some concerns over that missing constraint, and anything it was supposed to do after that failure...
Upgrading BugNET
Upgrade Status Report
Current Assembly Version: 1.5.258.0
Current Database Version: 1.4.256.0

00:00:00.0030001 - Upgrading To Version: 1.5.258.0
00:00:00.0240013 -    Executing Script: 1.5.258.0.SqlDataProvider.sql Error!
Error Details

File    1.5.258.0.SqlDataProvider.sql
Error   The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.BugNet_RelatedIssues' and the index name 'PK_BugNet_RelatedIssues'. The duplicate key value is (200, 208). Could not create constraint. See previous errors. The statement has been terminated.

Upgrade Complete
Click Here To Access Your BugNET Installation
Aug 28, 2013 at 1:48 PM
Good progress.

You could remove the offending rows and run the upgrade again.

I will take a look at the link for the password reset email.
Aug 28, 2013 at 2:51 PM
Thanks.

I deleted the "related issues" which appeared to be causing the problem, although from the UI perspective they seemed to be entirely legitimate. There were four I had to "fix", with issue IDs from 200 (the 1st one above) through 1700-and something. Those would be from early versions of BugNet - 0.8 perhaps? Anyway, I deleted the references from the UI and managed to get that bit of foreign-key creation to work.

Then I re-ran the upgrade script, but the screen kind of goes red, but looking at it, the scripts aren't designed to be run twice, so those may well be benign errors, and it does seem to work still.

Commercially we always script our SQL upgrades to run multiple times for that reason plus efficiency and dealing with dependencies. Anyway, it's probably ok and the issues were probably caused by problems in very old releases.