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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryIssue upgrading to 3.01.14 RC11Issue upgrading to 3.01.14 RC11
Previous
 
Next
New Post
2/3/2008 10:29 PM
 

I wanted to try 3.01.14 in advance of official release as I really needed the ability for modertors to be able to delete files which it provides. However, I giot thsi during the install:

System.Data.SqlClient.SqlException: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_grmRepositoryAttributeValues_grmRepositoryAttributes". The conflict occurred in database "TelequipTest", table "dbo.grmRepositoryAttributes", column 'ItemID'. 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) /* =====================================================================*/ /***** Initialization Script 03.01.14 *****/ /* =====================================================================*/ /* =====================================================================*/ if exists (select * from dbo.sysobjects where id = object_id(N'[FK_grmRepositoryAttributeValues_grmRepositoryAttributes]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) ALTER TABLE dbo.[grmRepositoryAttributeValues] DROP CONSTRAINT [FK_grmRepositoryAttributeValues_grmRepositoryAttributes] if exists (select * from dbo.sysobjects where id = object_id(N'[PK_grmRepositoryAttributes]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1) ALTER TABLE dbo.[grmRepositoryAttributes] DROP CONSTRAINT [PK_grmRepositoryAttributes] if exists (select * from dbo.sysobjects where id = object_id(N'[PK_grmRepositoryCategories]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1) ALTER TABLE dbo.[grmRepositoryCategories] DROP CONSTRAINT [PK_grmRepositoryCategories] if exists (select * from dbo.sysobjects where id = object_id(N'[PK_grmRepositoryComments]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1) ALTER TABLE dbo.[grmRepositoryComments] DROP CONSTRAINT [PK_grmRepositoryComments] if exists (select * from dbo.sysobjects where id = object_id(N'[PK_grmRepositoryObjectValues]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1) ALTER TABLE dbo.[grmRepositoryObjectValues] DROP CONSTRAINT [PK_grmRepositoryObjectValues] if exists (select * from dbo.sysobjects where id = object_id(N'[PK_grmRepositoryObjects]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1) ALTER TABLE dbo.[grmRepositoryObjects] DROP CONSTRAINT [PK_grmRepositoryObjects] if exists (select * from dbo.sysobjects where id = object_id(N'[PK_grmRepositoryAttributeValues]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1) ALTER TABLE dbo.[grmRepositoryAttributeValues] DROP CONSTRAINT [PK_grmRepositoryAttributeValues] if exists (select * from dbo.sysindexes where name = 'IX_grmRepositoryAttributes') DROP INDEX dbo.[grmRepositoryAttributes].[IX_grmRepositoryAttributes] if exists (select * from dbo.sysobjects where id = object_id(N'[DF_grmRepositoryCategories_Parent]') and OBJECTPROPERTY(id, N'IsConstraint') = 1) ALTER TABLE dbo.[grmRepositoryCategories] DROP CONSTRAINT [DF_grmRepositoryCategories_Parent] if exists (select * from dbo.sysindexes where name = 'IX_grmRepositoryCategories') DROP INDEX dbo.[grmRepositoryCategories].[IX_grmRepositoryCategories] if exists (select * from dbo.sysindexes where name = 'IX_grmRepositoryComments') DROP INDEX dbo.[grmRepositoryComments].[IX_grmRepositoryComments] if exists (select * from dbo.sysindexes where name = 'IX_grmRepositoryObjectValues') DROP INDEX dbo.[grmRepositoryObjectValues].[IX_grmRepositoryObjectValues] if exists (select * from dbo.sysindexes where name = 'IX_grmRepositoryObjects') DROP INDEX dbo.[grmRepositoryObjects].[IX_grmRepositoryObjects] if exists (select * from dbo.sysindexes where name = 'IX_grmRepositoryAttributeValues') DROP INDEX dbo.[grmRepositoryAttributeValues].[IX_grmRepositoryAttributeValues] /* =====================================================================*/ ALTER TABLE dbo.[grmRepositoryAttributes] ADD CONSTRAINT [PK_grmRepositoryAttributes] PRIMARY KEY CLUSTERED ([ItemID]) ALTER TABLE dbo.[grmRepositoryCategories] ADD CONSTRAINT [PK_grmRepositoryCategories] PRIMARY KEY CLUSTERED ([ItemId]) ALTER TABLE dbo.[grmRepositoryComments] ADD CONSTRAINT [PK_grmRepositoryComments] PRIMARY KEY CLUSTERED ([ItemID]) ALTER TABLE dbo.[grmRepositoryObjectValues] ADD CONSTRAINT [PK_grmRepositoryObjectValues] PRIMARY KEY CLUSTERED ([ItemID]) ALTER TABLE dbo.[grmRepositoryObjects] ADD CONSTRAINT [PK_grmRepositoryObjects] PRIMARY KEY CLUSTERED ([ItemID]) ALTER TABLE dbo.[grmRepositoryAttributeValues] ADD CONSTRAINT [PK_grmRepositoryAttributeValues] PRIMARY KEY CLUSTERED ([ItemID]) /* =====================================================================*/ CREATE INDEX [IX_grmRepositoryAttributes] ON dbo.[grmRepositoryAttributes]([ModuleID]) ALTER TABLE dbo.[grmRepositoryCategories] ADD CONSTRAINT [DF_grmRepositoryCategories_Parent] DEFAULT ((-1)) FOR [Parent] CREATE INDEX [IX_grmRepositoryCategories] ON dbo.[grmRepositoryCategories]([ModuleId]) CREATE INDEX [IX_grmRepositoryComments] ON dbo.[grmRepositoryComments]([ObjectID]) CREATE INDEX [IX_grmRepositoryObjectValues] ON dbo.[grmRepositoryObjectValues]([ObjectID]) CREATE INDEX [IX_grmRepositoryObjects] ON dbo.[grmRepositoryObjects]([ModuleID]) CREATE INDEX [IX_grmRepositoryAttributeValues] ON dbo.[grmRepositoryAttributeValues]([AttributeID]) /* =====================================================================*/ ALTER TABLE dbo.[grmRepositoryAttributeValues] ADD CONSTRAINT [FK_grmRepositoryAttributeValues_grmRepositoryAttributes] FOREIGN KEY ([AttributeID]) REFERENCES dbo.[grmRepositoryAttributes] ([ItemID]) /* =====================================================================*/ if exists (select * from dbo.sysobjects where id = object_id(N'dbo.grmGetSingleRepositoryObject') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure dbo.grmGetSingleRepositoryObject System.Data.SqlClient.SqlException: There is already an object named 'grmGetSingleRepositoryObject' in the database. 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) /* =====================================================================*/ CREATE procedure dbo.grmGetSingleRepositoryObject @ItemID int AS SELECT a.*, ( SELECT COUNT(dbo.grmRepositoryComments.ItemID) FROM dbo.grmRepositoryComments WHERE dbo.grmRepositoryComments.ObjectID=a.ItemID ) AS CommentCount FROM dbo.grmRepositoryObjects a where a.ItemID = @ItemID

 

Any ideas?

 
New Post
2/6/2008 2:08 PM
 

it appears to be a data condition ...

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_grmRepositoryAttributeValues_grmRepositoryAttributes". The conflict occurred in database "TelequipTest", table "dbo.grmRepositoryAttributes", column 'ItemID'

 

take a look at the grmRepositoryAttributes and grmRepositoryAttributeValues tables and the values in the key column. 3.01.14 adds index and foreign keys to improve performance, however if you have some bad data in your existing tables that would violate the new constraints you may have upgrade issues until you 'clean' your data. Make sure you don't have any orphan records in the grmRepositoryAttributeValues table that would point to a record in your grmRepositoryAttributes table that no longer exists.

 
New Post
4/17/2008 10:11 PM
 

Steve,

Sorry it took a while to get back on this - the project went to sleep for a while. You were exactly correct about the orphan records in the grmRepositoryAttributeValues table. I got rid of those and the scripts ran through cleanly.

Thanks,

Graham

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryIssue upgrading to 3.01.14 RC11Issue upgrading to 3.01.14 RC11


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