IF COL_LENGTH('EST_ENTID_DOACAO','CD_FORN') IS NULL
BEGIN
    ALTER TABLE EST_ENTID_DOACAO ADD CD_FORN INT NULL
    ALTER TABLE EST_ENTID_DOACAO ADD CONSTRAINT EST_ENTID_DOACAO_PG_FORN_FK FOREIGN KEY(CD_EMP,CD_FORN) REFERENCES PG_FORN(CD_EMP,CD_FORN)
END
