The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType".
It occurs when you try to delete a property form a document type.
Here is a quick fix that does not involve manually deleting things....
Open up SQL Management Studio.
Change delete rule for the relationship between cmsPropertyType and cmsPropertyData to "cascade".
DONE!
Thanks, it helped me a lot!
ReplyDeleteHi,
ReplyDeleteFor those who'd rather run a script I've used the following.
IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_cmsPropertyData_cmsPropertyType_id]') AND parent_object_id = OBJECT_ID(N'[dbo].[cmsPropertyData]'))
ALTER TABLE [dbo].[cmsPropertyData] DROP CONSTRAINT [FK_cmsPropertyData_cmsPropertyType_id]
GO
ALTER TABLE [dbo].[cmsPropertyData] WITH CHECK ADD CONSTRAINT [FK_cmsPropertyData_cmsPropertyType_id] FOREIGN KEY([propertytypeid])
REFERENCES [dbo].[cmsPropertyType] ([id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[cmsPropertyData] CHECK CONSTRAINT [FK_cmsPropertyData_cmsPropertyType_id]
GO
Chris is my new best friend...
ReplyDelete