rem
rem $Header: /s/rw/994/spam/precious/files/ACTIVE/srw20110.sql,v 1.1 1998/11/03 06:57:47 yxia Exp $
rem
rem  Copyright (c) Oracle Corporation 1991.  All Rights Reserved, Worldwide.
rem
rem  srw20110.sql:
rem
rem     o Adds columns to srw2__column and to srw2__data_model

rem  +-----------------------------+
rem  |  Update to SRW2_DATA_MODEL  |
rem  +-----------------------------+

drop view srw2_data_model;
drop index srw2_data_model_idx;
drop public synonym srw2_data_model;


alter table srw2__data_model add 
( 
  decurref_id     decimal(10)     /* DE refenence id count  */
);
create unique index srw2_data_model_idx on srw2__data_model
(
  owner, modid, itemid
);

create view srw2_data_model as
  select * from srw2__data_model
  where owner = user or modid in
  (select modid from tool_accessible where product='SQL*ReportWriter')
  with check option;

create public synonym srw2_data_model for system.srw2_data_model;


rem  +-------------------------+
rem  |  Update to SRW2_COLUMN  |
rem  +-------------------------+

drop view srw2_column;
drop index srw2_column_idx;
drop public synonym srw2_column;


alter table srw2__column add 
( 
  deref_id     decimal(10)     /* DE refenence id */
);

create unique index srw2_column_idx on srw2__column
(
  owner, modid, itemid
);

create view srw2_column as
  select * from srw2__column
  where owner = user or modid in
  (select modid from tool_accessible where product='SQL*ReportWriter')
  with check option;

create public synonym srw2_column for system.srw2_column;
