IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_EST_PROD_TRANSF_SOLICITACAO_PENDENCIA_EST_PROD_TRANSF_SOLICITACAO]'))
begin
	ALTER TABLE [dbo].[EST_PROD_TRANSF_SOLICITACAO_PENDENCIA] DROP CONSTRAINT [FK_EST_PROD_TRANSF_SOLICITACAO_PENDENCIA_EST_PROD_TRANSF_SOLICITACAO]
end
go
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_EST_PROD_TRANSF_SOLICITACAO_EST_PROD_TRANSF_SOLICITACAO_PENDENCIA]'))
begin
	ALTER TABLE [dbo].[EST_PROD_TRANSF_SOLICITACAO] DROP CONSTRAINT [FK_EST_PROD_TRANSF_SOLICITACAO_EST_PROD_TRANSF_SOLICITACAO_PENDENCIA]
end
go
ALTER TABLE dbo.EST_PROD_TRANSF_SOLICITACAO_PENDENCIA ADD CONSTRAINT
	FK_EST_PROD_TRANSF_SOLICITACAO_PENDENCIA_EST_PROD_TRANSF_SOLICITACAO FOREIGN KEY
	(
	CD_CTR
	) REFERENCES dbo.EST_PROD_TRANSF_SOLICITACAO
	(
	CD_CTR
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
go
ALTER TABLE dbo.EST_PROD_TRANSF_SOLICITACAO_PENDENCIA SET (LOCK_ESCALATION = TABLE)

