
/*------ ATD 198946 ------*/
DECLARE v_count NUMBER(1) := 0;
BEGIN
  SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE upper(table_name) = 'CONTROLERMA' AND upper(column_name) = 'USUARIOLIBERACAOTROCA';
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
     EXECUTE IMMEDIATE 'ALTER TABLE CONTROLERMA ADD USUARIOLIBERACAOTROCA CHAR(3)';
END;

DECLARE v_count NUMBER(1) := 0;
BEGIN
  SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE upper(table_name) = 'CONTROLERMA' AND upper(column_name) = 'USUARIOLIBERACAOENTRADA';
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
     EXECUTE IMMEDIATE 'ALTER TABLE CONTROLERMA ADD USUARIOLIBERACAOENTRADA CHAR(3)';
END;

DECLARE v_count NUMBER(1) := 0;
BEGIN
  SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE table_name = 'SENHVENCAD' AND column_name = 'LIBTROCARMA';
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
     EXECUTE IMMEDIATE 'ALTER TABLE SENHVENCAD ADD LIBTROCARMA CHAR(1)';
END;

DECLARE v_count NUMBER(1) := 0;
BEGIN
  SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE table_name = 'SENHVENCAD' AND column_name = 'LIBENTRADARMA';
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
     EXECUTE IMMEDIATE 'ALTER TABLE SENHVENCAD ADD LIBENTRADARMA CHAR(1)';
END;
