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

BEGIN

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'TRANSACAO_PEDIDO_ECOMMERCE' AND Upper(COLUMN_NAME) = 'CODIGOBARRA' AND DATA_LENGTH < 50;

IF v_count > 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE TRANSACAO_PEDIDO_ECOMMERCE MODIFY CODIGOBARRA VARCHAR2(50)';

END IF;

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'CONFIGURACAO_ECOMMERCE' AND Upper(COLUMN_NAME) = 'CODIGOECOMMERCE' AND DATA_LENGTH < 200;

IF v_count > 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE CONFIGURACAO_ECOMMERCE MODIFY CODIGOECOMMERCE VARCHAR2(200)';

END IF;

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'CONFIGURACAO_ECOMMERCE' AND Upper(COLUMN_NAME) = 'CLASSE' AND DATA_LENGTH < 50;

IF v_count > 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE CONFIGURACAO_ECOMMERCE MODIFY CLASSE VARCHAR2(50)';

END IF;

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'INCONSISTENCIANFE' AND Upper(COLUMN_NAME) = 'CODMENSAGEM' AND DATA_LENGTH < 5;

IF v_count > 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE INCONSISTENCIANFE MODIFY CODMENSAGEM VARCHAR2(5)';

END IF;

END;
