this is the second DNN 3.2.2 that I have upgraded to 3.3.7 and in both occasions the process failed to upgrade to 3.2.3 with this diagnostic outcome:
System.Data.SqlClient.SqlException: There is already an object named 'PK_UserProfile' in the database.
Could not create constraint. See previous errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
/* Add UserProfile Table */
/*************************/
IF NOT EXISTS (select * from dbo.sysobjects where id = object_id(N'dbo.[UserProfile]') and OBJECTPROPERTY(id, N'IsTable') = 1)
BEGIN
CREATE TABLE dbo.UserProfile
(
[ProfileID] int IDENTITY(1,1) NOT NULL,
[UserID] int NOT NULL,
[PropertyDefinitionID] int NOT NULL,
[PropertyValue] nvarchar(3750) NULL,
[PropertyText] ntext NULL,
[Visibility] int NOT NULL DEFAULT 0,
[LastUpdatedDate] datetime NOT NULL
)
ALTER TABLE dbo.UserProfile
ADD CONSTRAINT [PK_UserProfile] PRIMARY KEY NONCLUSTERED ([ProfileID])
ALTER TABLE dbo.UserProfile WITH NOCHECK
ADD CONSTRAINT [FK_UserProfile_Users] FOREIGN KEY([UserID]) REFERENCES dbo.[Users] ([UserID]) ON DELETE CASCADE
ALTER TABLE dbo.UserProfile WITH NOCHECK
ADD CONSTRAINT [FK_UserProfile_ProfilePropertyDefinition] FOREIGN KEY([PropertyDefinitionID]) REFERENCES dbo.[ProfilePropertyDefinition] ([PropertyDefinitionID]) ON DELETE CASCADE
END
System.Data.SqlClient.SqlException: ALTER TABLE statement conflicted with COLUMN FOREIGN KEY constraint 'FK_Files_Folders'. The conflict occurred in database 'DotNetNuke', table 'Folders', column 'FolderID'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
ALTER TABLE dbo.Files ADD CONSTRAINT
FK_Files_Folders FOREIGN KEY
(
FolderID
) REFERENCES dbo.Folders
(
FolderID
)
Even after this failure I am able to proceed normally. and the new release in record is 3.3.7
I am new at this and not a programmer, as anyone experienced this and is it risky to proceed.
any information will be greatly appreciated.
Franc