Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Upgrading 3.2.2 to 3.3.7 Error 03.02.03.log 03.03.01.logUpgrading 3.2.2 to 3.3.7 Error 03.02.03.log 03.03.01.log
Previous
 
Next
New Post
4/14/2008 10:04 AM
 

Hello all,

I upgraded my app from 3.2.2 to 3.3.7. I got the following error in the upgrade log:

03.02.03.log:

/***************************************************************

System.Data.SqlClient.SqlException:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_GSW_Files_GSW_Folders". The conflict occurred in database "GSW", table "dbo.GSW_Folders", column 'FolderID'.


ALTER TABLE dbo.GSW_Files ADD CONSTRAINT
 FK_GSW_Files_GSW_Folders FOREIGN KEY
 (FolderID) REFERENCES dbo.GSW_Folders (FolderID)

************************************************************/

I then ran the following statement to verify any integrity  inconsistencies:

SELECT  
  A.*,
  B.FolderID

FROM  GSW_Files AS A

LEFT JOIN GSW_Folders AS B
ON   A.FolderID = B.FolderId

WHERE  B.FolderID IS NULL; 

I discovered that the Files table has several records where FolderID = 0. However the Folders table does not have any record where FolderID = 0.

There are abviously files that are not "part" of a folder. What does this imply about my app?

How can it be fixed?

Thanks

 


RadSrag
 
New Post
4/16/2008 12:30 PM
 

I resolved this issue in the following way.

When applying the upgrade, an SQL script (03.02.03.SqlDataProvider) runs against the DB, and alters these tables by adding some new ID fields based on the Files.Folder - Folders.FolderPath fields. Then creates a constraint relating these tables on the newly created ID fields.

Before the 3.3.7 upgrade, my Files table had entries in the Folder field which didn't correspond to any entries in the Folders table, some the new ID field in one table didn't correspond the the ID of the other table. Then the script tried to create the constraint (see error above).

My solution was to add the following in the 03.02.03.SqlDataProvider file at before applying the upgrade:

/************************************************************************
2008-04-14  -      Added this statement to fix file path before
                              creating the Files_Folders constraint below. */
 
UPDATE {objectQualifier}Files
SET        Folder = 'GoodPath/'
WHERE Folder = 'C:/BadPath/BadPath/'
GO

/**************************************************************************/

Mind you, all this is probably due to the fact that this app is a testing version.

Cheers


RadSrag
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Upgrading 3.2.2 to 3.3.7 Error 03.02.03.log 03.03.01.logUpgrading 3.2.2 to 3.3.7 Error 03.02.03.log 03.03.01.log


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out