BugNET

Open source issue tracking & project management

Forums

HomeHomeDevelopment and...Development and...General Develop...General Develop...0.7 to 0.8 Upgrade Script0.7 to 0.8 Upgrade Script
Previous
 
Next
New Post
12/4/2009 6:34 AM
 

I just tried upgrading my instance of BugNET (0.7.942) to the latest SVN (893). I am getting the following error:

Upgrade Status Report

Current Assembly Version: 0.8.0.0

Current Database Version: 0.7.942.0

00:00:00 - Upgrading To Version: 0.8.0.0


00:00:00.0156252 - Executing Script: BugNet.Schema.SqlDataProvider.sql

Success


Error: An error has occured accessing the database

Upgrade Failed!

It appears to be dying in the following block of code from Install.aspx.cs @ line 254:

//check if the admin user is in the super users role.
bool found = false;
List<Role> roles = Role.GetRolesForUser("admin");
if (roles.Count > 0)
{
Role role = roles.Single(r => r.Name == Globals.SuperUserRole);
if (role != null)
found = true;
}
if (!found)
Role.AddUserToRole("admin", 1);

Upgrade.UpdateDatabaseVersion(GetCurrentVersion());

return true;
}
catch (Exception e)

I verified the Admin user is in Role 1.

Then, if I skip over the Admin block, and start with Upgrade.Update...., it runs to completion giving me the Upgrade Complete message.

Then the application does not start.

The next piece of the puzzle is that arrScriptFiles @ line 239 is left empty. Of the scripts that are executed, the BugNET Data script is not applied to the upgrade.

I added the line

ExecuteSqlInFile(Server.MapPath("~/Install/dbscripts/BugNet.Data.SqlDataProvider.sql"));

to the method at line 218. And any system data already in the app is no longer visible when I log in. But I could log in with the user ID I had been working with....

Also - the exception above goes away.

I am running VS2008 w/ SQL2008. Any help that I can provide, please let me know...

Thanks!

Gary Klesczewski

 
New Post
12/4/2009 6:49 AM
 

Quick update - I added the line

ExecuteSqlInFile(Server.MapPath("~/Install/dbscripts/Latest.SqlDataProvider.sql"));
instead of BugNet.Data.SqlDataProvider, and now the upgrade appears to be working for me.

But I have not yet fully tested the instance.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...General Develop...General Develop...0.7 to 0.8 Upgrade Script0.7 to 0.8 Upgrade Script


Forum Policy

These Discussion Forums are dedicated to the discussion of the BugNET issue tracker.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Site Moderators have the final word on approving/removing a thread or post or comment.
5. English language posting only, please.