REM $Id$
BEGIN
  dbms_output.enable;
  dbms_output.put_line('UpgradeBulkLoad: Add SELFPURGING to ADDITIONAL_ITEMS');

  UPDATE additional_items
  SET    description = 'No Purging Required'
        ,lead_time   = 0
  WHERE  code = 'SELFPURGING';

  IF SQL%ROWCOUNT <> 0 THEN
    dbms_output.put_line('UpgradeBulkLoad:  - Done (Update)');
  ELSE
    INSERT INTO additional_items
      (code
      ,description
      ,lead_time)
    VALUES
      ('SELFPURGING'
      ,'No Purging Required'
      ,0);
    dbms_output.put_line('UpgradeBulkLoad:  - Done (Insert)');
  END IF;

  dbms_output.put_line('UpgradeBulkLoad: Add SELFPURGING to CAVEAT_TEXTS');

  UPDATE caveat_texts
  SET    adit_code = 'SELFPURGING'
        ,condition = 'NULL'
  WHERE  text LIKE 'Where purging of downstream%';

  IF SQL%ROWCOUNT <> 0 THEN
    dbms_output.put_line('UpgradeBulkLoad:  - Done (Update)');
  ELSE
    dbms_output.put_line('UpgradeBulkLoad:  - Not Done (No Caveats Found)');
  END IF;
END;
/
exit

