IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EST_NF_ENT' AND COLUMN_NAME = 'PERC_SUFRAMA')
BEGIN 
    ALTER TABLE EST_NF_ENT ADD PERC_SUFRAMA MONEY NULL;
END

IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EST_NF_ENT' AND COLUMN_NAME = 'VLR_SUFRAMA')
BEGIN 
    ALTER TABLE EST_NF_ENT ADD VLR_SUFRAMA MONEY NULL;
END

IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EST_NF_ENT' AND COLUMN_NAME = 'LIMITE_SUFRAMA')
BEGIN 
    ALTER TABLE EST_NF_ENT ADD LIMITE_SUFRAMA MONEY NULL;
END

IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EST_NF_ENT' AND COLUMN_NAME = 'PERC_FTI')
BEGIN 
    ALTER TABLE EST_NF_ENT ADD PERC_FTI MONEY NULL;
END

IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EST_NF_ENT' AND COLUMN_NAME = 'VLR_FTI')
BEGIN 
    ALTER TABLE EST_NF_ENT ADD VLR_FTI MONEY NULL;
END

IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EST_NF_ENT' AND COLUMN_NAME = 'FLAG_APURACAO_FTI')
BEGIN 
    ALTER TABLE EST_NF_ENT ADD FLAG_APURACAO_FTI INT NULL;
END

IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EST_NF_ENT' AND COLUMN_NAME = 'FLAG_APURACAO_SUFRAMA')
BEGIN 
    ALTER TABLE EST_NF_ENT ADD FLAG_APURACAO_SUFRAMA INT NULL;
END