rem
rem  Copyright (c) Oracle Corporation 1993.  All Rights Reserved, Worldwide.
rem
rem  toolupdt.sql - cumulative update script for TOOL database tables.
rem
rem  This script may be applied repeatedly without damage to the tables or
rem  their data they contain.  Some SQL warnings or errors will occur when
rem  you do this, they may be safely ignored.
rem
rem  Changes and the versions in which they appeared:
rem
rem    2.0.9.2  - Change the TOOL_MODULE_IDX index
rem               Change the TOOL_ACCESSIBLE view to allow wild-card match
rem
rem    2.0.8.7  - Add storage clause to TOOL_LRAW and TOOL_LTEXT
rem
rem    2.0.8.6  - Alter TOOL__MODULE definition
rem

rem
rem  Alter the definition of the TOOL__MODULE table
rem

alter table TOOL__MODULE modify
(
  create_ver  decimal(10),    /* Product Version created with      */
  mod_ver     decimal(10),    /* Product version modified with     */
  tcs_ver     decimal(10),    /* Tool Module version               */
  vgs_ver     decimal(10),    /* VGS version                       */
  de_ver      decimal(10),    /* DE version                        */
  ros_ver     decimal(10)     /* ROS version                       */
);

rem
rem  Add storage clauses to TOOL__LRAW and TOOL__LTEXT tables
rem

alter table TOOL__LRAW
  storage
  (
    next    100K
  );

alter table TOOL__LTEXT
  storage
  (
    next    100K
  );

rem
rem  Change the TOOL_MODULE_IDX unique index to consist of 3 fields
rem

drop index TOOL_MODULE_IDX;
create unique index TOOL_MODULE_IDX on tool__module
(
  owner, modname, modtype
);

rem
rem  Drop and re-create the TOOL_ACCESSIBLE view to allow wild-card match
rem

drop view TOOL_ACCESSIBLE;

create view TOOL_ACCESSIBLE as
  select * from tool__access
  where grantee = 'PUBLIC' or user like grantee;
