rem
rem $Id: srw2520.sql,v 1.1 1998/11/03 06:57:57 yxia Exp $
rem
rem  Copyright (c) Oracle Corporation 1991.  All Rights Reserved, Worldwide.
rem
rem  srw2530.sql
rem

rem  +------------------------------+
rem  |  Update to SRW2_BOILERPLATE  |
rem  +------------------------------+

drop view srw2_boilerplate;
drop index srw2_boilerplate_idx;
drop public synonym srw2_boilerplate;


alter table srw2__boilerplate add
(
  bidi_dir   decimal(5)    /* Text Direction (Right->Left, Left->Right) */
);

create unique index srw2_boilerplate_idx on srw2__boilerplate
(
  owner, modid, itemid
);

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

create public synonym srw2_boilerplate for system.srw2_boilerplate;


rem  +------------------------------+
rem  |  Update to SRW2_BUTTON       |
rem  +------------------------------+

drop view srw2_button;
drop index srw2_button_idx;
drop public synonym srw2_button;


alter table srw2__button add
(
  bidi_dir   decimal(5)    /* Text Direction (Right->Left, Left->Right) */
);

create unique index srw2_button_idx on srw2__button
(
  owner, modid, itemid
);

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

create public synonym srw2_button for system.srw2_button;


rem  +------------------------------+
rem  |  Update to SRW2_FIELD        |
rem  +------------------------------+

drop view srw2_field;
drop index srw2_field_idx;
drop public synonym srw2_field;


alter table srw2__field add
(
  bidi_dir   decimal(5)    /* Text Direction (Right->Left, Left->Right) */
);

create unique index srw2_field_idx on srw2__field
(
  owner, modid, itemid
);

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

create public synonym srw2_field for system.srw2_field;


rem  +------------------------------+
rem  |  Update to SRW2_FRAME        |
rem  +------------------------------+

drop view srw2_frame;
drop index srw2_frame_idx;
drop public synonym srw2_frame;


alter table srw2__frame add
(
  bidi_dir   decimal(5)    /* Text Direction (Right->Left, Left->Right) */
);

create unique index srw2_frame_idx on srw2__frame
(
  owner, modid, itemid
);

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

create public synonym srw2_frame for system.srw2_frame;


rem  +-------------------------+
rem  |  Update to SRW2_LAYOUT  |
rem  +-------------------------+

drop view srw2_layout;
drop index srw2_layout_idx;
drop public synonym srw2_layout;


alter table srw2__layout add 
( 
  bidi_dir   decimal(5)    /* Text Direction (Right->Left, Left->Right) */
);

create unique index srw2_layout_idx on srw2__layout
(
  owner, modid, itemid
);

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

create public synonym srw2_layout for system.srw2_layout;


rem  +-------------------------+
rem  |  Commit                 |
rem  +-------------------------+

commit;
