IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_EST_NFE_MAN_PED_TRANSF_CRED_IBS_EST_NF_SAI]'))
begin
	ALTER TABLE EST_NFE_MAN_PED_TRANSF_CRED_IBS_EST_NF_SAI ADD CONSTRAINT FK_EST_NFE_MAN_PED_TRANSF_CRED_IBS_EST_NF_SAI
	FOREIGN KEY (CD_EMP, CD_FILIAL, CD_NF) REFERENCES EST_NF_SAI (CD_EMP, CD_FILIAL, CD_NF);
end