BugNET

Open source issue tracking & project management

Forums

HomeHomeSupportSupportUpgrading BugNE...Upgrading BugNE...Upgrade to 0.7 RC1 ErrorsUpgrade to 0.7 RC1 Errors
Previous
 
Next
New Post
5/27/2009 6:55 AM
 

carlowahlstedt wrote

What do you mean by "not good"? Like my data was bad. From here out some of the bugs will have issues?

 

What can be done to fix it?

You should roll back the install till we can address the issues.


Davin Dubeau

follow us on twitter facebook users group google plus
 
New Post
5/27/2009 9:40 AM
 

Do you need any other info from me to figure out how to fix it?

 
New Post
5/27/2009 10:15 AM
 

carlowahlstedt wrote

Do you need any other info from me to figure out how to fix it?

I think we have narrowed the cause down to part of the cleanup script that removes orphaned users failing which results in the rest of the script to error.   If you could test again when we have another version that would be great.


Davin Dubeau

follow us on twitter facebook users group google plus
 
New Post
6/4/2009 9:10 AM
 

I found where the problems exist in the upgrade script and fixed them myself in my database. They are below. I'll still be happy to test the next version of your upgrade script if you'd still like.

 

 

For these errors:

    Error in file:C:\inetpub\wwwroot\BugNet\Install\dbscripts\0.7.936.0.SqlDataProvider.sql
    Message:The constraint 'PK__Component__09DE7BCC' is being referenced by table 'Bug', foreign key constraint 'FK_Bug_Component'. Could not drop constraint. See previous errors.

    Error in file:C:\inetpub\wwwroot\BugNet\Install\dbscripts\0.7.936.0.SqlDataProvider.sql
    Message:Table 'Component' already has a primary key defined on it. Could not create constraint. See previous errors.

There seems to be no reason to do the following statements. If they were taken out it wouldn't error.
   
LINE 496
    ALTER TABLE [dbo].[Component] DROP CONSTRAINT [PK__Component__09DE7BCC]

LINE 770
    ALTER TABLE [dbo].[Component] ADD
        CONSTRAINT [PK_Component] PRIMARY KEY CLUSTERED
        (
            [ComponentID]
        ) ON [PRIMARY];
 

 

For this error:
    Error in file:C:\inetpub\wwwroot\BugNet\Install\dbscripts\0.7.936.0.SqlDataProvider.sql
    Message:The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_UserProjects_aspnet_Users". The conflict occurred in database "BugNet", table "dbo.aspnet_Users", column 'UserId'.

The data just needs cleaned up. The select statement will show the bad data. The delete will clean the data up.

    SELECT * FROM UserProjects WHERE UserId NOT IN (SELECT UserId FROM aspnet_Users)
    --DELETE FROM UserProjects WHERE UserId NOT IN (SELECT UserId FROM aspnet_Users)



For this error:
    Error in file:C:\inetpub\wwwroot\BugNet\Install\dbscripts\0.7.936.0.SqlDataProvider.sql
    Message:The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Bug_FixedInVersionId". The conflict occurred in database "BugNet", table "dbo.Version", column 'VersionID'.

The data just needs cleaned up. The select statement will show the bad data. The delete will clean the data up.

    SELECT * FROM Bug WHERE FixedInVersionId NOT IN (SELECT VersionID FROM Version)
    --UPDATE Bug SET FixedInVersionId = (SELECT TOP 1 VersionID FROM Version WHERE ProjectID = Bug.ProjectID) WHERE FixedInVersionId = -1
 

 

For this error:
    Error in file:C:\inetpub\wwwroot\BugNet\Install\dbscripts\0.7.936.0.SqlDataProvider.sql
    Message:Introducing FOREIGN KEY constraint 'FK_Component_Project' on table 'Component' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. Could not create constraint. See previous errors.

The alter constraint just doesn't need the 'ON UPDATE NO ACTION ON DELETE CASCADE' and it works fine to add the contraint

LINE 1146
    ALTER TABLE [dbo].[Component] WITH NOCHECK ADD
        CONSTRAINT [FK_Component_Project] FOREIGN KEY
        (
            [ProjectID]
        )REFERENCES [dbo].[Project](
            [ProjectID]
        ) ON UPDATE NO ACTION ON DELETE CASCADE

 


For this error:
    Error in file:C:\inetpub\wwwroot\BugNet\Install\dbscripts\0.7.936.0.SqlDataProvider.sql
    Message:The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_UserRoles_aspnet_Users". The conflict occurred in database "BugNet", table "dbo.aspnet_Users", column 'UserId'.

Again the data is bad and needs cleaned up. The select statement will show the bad data. The delete will clean the data up.
    --select * from UserRoles where UserId not in (select UserId from aspnet_Users)
    delete from UserRoles where UserId not in (select UserId from aspnet_Users)

 
New Post
6/4/2009 1:10 PM
 

Davin Dubeau

follow us on twitter facebook users group google plus
 
Previous
 
Next
HomeHomeSupportSupportUpgrading BugNE...Upgrading BugNE...Upgrade to 0.7 RC1 ErrorsUpgrade to 0.7 RC1 Errors


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.