IF NOT EXISTS (SELECT 1 FROM SYS.COLUMNS WHERE NAME = 'CD_FILIAL_ORIG' AND OBJECT_ID = OBJECT_ID('EST_PED_VD_DEVOLUCAO_NFE_CHAVE_REFERENCIA'))
BEGIN
	ALTER TABLE EST_PED_VD_DEVOLUCAO_NFE_CHAVE_REFERENCIA ADD CD_FILIAL_ORIG INT NULL
END