
/*------ ATD 319787 ------*/
DECLARE v_count NUMBER:=0;

BEGIN

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'PEDICLICOMPLEMENTO' AND Upper(COLUMN_NAME) = 'BLOQUEIADESDOBRAMENTO';

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE PediCliComplemento ADD BloqueiaDesdobramento NUMERIC(1,0) DEFAULT 0';

END IF;

END;