Foreign key violation when deploying site

Vote:
 

Hi 

I'm getting foreign key violations when deploying out new version of a site. It looks like the autogeneration of properties has failed. Is it possible to delete a property type of a page/block then allow the site to regenerate it.

Currently I am fixing by

  • deleting the property in code then deploying out
  • deleting the property in the admin console
  • restoring the property
  • redeploying the site

Clearly this isn't a long term solution. I need to be able to fix it in situ - without the need for 2 additional deployments of the site.

My error is

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblWorkContentProperty_tblPropertyDefinition". The conflict occurred in database "NITB_MIGRATION", table "dbo.tblPropertyDefinition", column 'pkID'.

Many thanks for any all help

#87400
Jun 12, 2014 13:16
Vote:
 

You have a stack trace?

#87480
Jun 13, 2014 15:54
Vote:
 

Mmmm it's stopped erroring now but it isn't saving. On publsih the field reverts to an empty string. I'll see if it starts to error again

#87485
Jun 13, 2014 17:09
Vote:
 

I've redeployed and got another FK error so this is cropping up a lot. The error is

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblWorkContentProperty_tblPropertyDefinition". The conflict occurred in database 
"NITB_MIGRATION", table "dbo.tblPropertyDefinition", column 'pkID'.

So same/similar

I'm going to raise a bug report about this as it's a geninue app issue

#87769
Jun 23, 2014 13:30
Vote:
 

You can delte Existing PageTypes/Bock Types If these have not been used from Admin mode.

Most probably some page/Block/media/meta type with that guid already exist.

/K

#87777
Jun 23, 2014 14:31
Vote:
 

Thanks for the input but unfortunately this isn't it. The Guids are OK and unique. Thanks

#87783
Jun 23, 2014 15:03
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.