Foreign key functions

nfanfa Posts: 2
edited December 16, 2016 5:47AM in SQL Comparison SDK 11

I have a problem when Redgate finds a function that is different. The function is used in a constraint so the constraint should be dropped before altering the function.

ALTER TABLE [dat].[workflows] WITH CHECK ADD CONSTRAINT [CK_workflow#users] CHECK (([dat].[f_constraint_workflow_users]([client_id],[workflow_id],[active])='OK'))

The function dat.f_constraint_workflow_users is different and Redgate alters the function with an error:

Cannot ALTER 'dat.f_constraint_workflow_users' because it is being referenced by object 'CK_workflow#users'.

It's the same when a function uses an assembly, if the assembly is different the function that use the assembly is not dropped before the assembly is recreated. In this case I always remove the functions before I run Redgate so that I can live with.

But how do I solve the constraint problem?




Sign In or Register to comment.