--UPDATE FROM 8.7.3.0 TO 8.7.4.0


DROP TABLE VERSION_8_7_3_0;


/*  VERSION_8_7_4_0  */
CREATE TABLE VERSION_8_7_4_0 (
	 DUMMY	NUMBER	    NULL
)
;


ALTER TABLE WMSO ADD WMSO_MIICS NUMBER(1);

COMMENT ON COLUMN WMSO.WMSO_MIICS IS 'Matched individuals if company selected';

ALTER TABLE ZWTR ADD ZWTR_WPCA_ID NUMBER(30);

COMMENT ON COLUMN ZWTR.ZWTR_WPCA_ID IS 'ID of the terminal where the change has been made';

CREATE TABLE YHAC (
   YHAC_ID NUMBER(30) NOT NULL
  ,YHAC_COMMENT VARCHAR2(200)
  ,CONSTRAINT YHAC_PK PRIMARY KEY (YHAC_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;
  
COMMENT ON TABLE YHAC IS 'Attendant comments';

CREATE SEQUENCE SEQ_YHAC INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

ALTER TABLE YHRL ADD YHRL_YHAC_ID NUMBER(30);

ALTER TABLE MMOD ADD MMOD_AUTH_USER VARCHAR2(30);

ALTER TABLE MMOD ADD MMOD_AUTH_PWD VARCHAR2(30);

COMMENT ON COLUMN MMOD.MMOD_AUTH_USER IS 'authentication user for HTTP access';

COMMENT ON COLUMN MMOD.MMOD_AUTH_PWD IS 'authentication pwd for HTTP access';

ALTER TABLE MCFG ADD MCFG_2WDISP_APPPATH VARCHAR2(100 BYTE);

ALTER TABLE MCFG ADD MCFG_2WDISP_LOGFILE VARCHAR2(100 BYTE);

ALTER TABLE MCFG ADD MCFG_2WDISP_LOGLEVEL NUMBER(1);

ALTER TABLE MCFG ADD MCFG_TRR_APPPATH VARCHAR2(100 BYTE);

ALTER TABLE MCFG ADD MCFG_TRR_LOGFILE VARCHAR2(100 BYTE);

ALTER TABLE MCFG ADD MCFG_TRR_LOGLEVEL NUMBER(1);

COMMENT ON COLUMN MCFG.MCFG_2WDISP_APPPATH IS ' Application path of the 2W dispatcher service.';

COMMENT ON COLUMN MCFG.MCFG_2WDISP_LOGFILE IS ' Log file for the 2W dispatcher module';

COMMENT ON COLUMN MCFG.MCFG_2WDISP_LOGLEVEL IS ' Log level of the 2W dispatcher, 0=debug, 1=trace, 2=Message, 3=Warning, 4=Error, 5=system, 6=fatal';

COMMENT ON COLUMN MCFG.MCFG_TRR_APPPATH IS ' Application path of the trigger reader service.';

COMMENT ON COLUMN MCFG.MCFG_TRR_LOGFILE IS ' Log file for the trigger reader module';

COMMENT ON COLUMN MCFG.MCFG_TRR_LOGLEVEL IS ' Log level of the trigger reader, 0=debug, 1=trace, 2=Message, 3=Warning, 4=Error, 5=system, 6=fatal';

CREATE TABLE MWSV
(
  MWSV_ID            NUMBER(30)                 NOT NULL,
  MWSV_MMOD_ID       NUMBER(30)                 NOT NULL,
  MWSV_SERVICE_NAME  VARCHAR2(30 BYTE)          NOT NULL,
  MWSV_URL           VARCHAR2(100 BYTE)         NOT NULL,
  CONSTRAINT MWSV_PK PRIMARY KEY (MWSV_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

COMMENT ON COLUMN MWSV.MWSV_ID IS 'unique id';

COMMENT ON COLUMN MWSV.MWSV_MMOD_ID IS 'linkage to mmod';

COMMENT ON COLUMN MWSV.MWSV_SERVICE_NAME IS 'service name used to identify url in listener';

COMMENT ON COLUMN MWSV.MWSV_URL IS 'webservice url used for connection';

ALTER TABLE MMOD ADD MMOD_HTTP_TIMEOUT_RESOLVE  NUMBER(5,0);

ALTER TABLE MMOD ADD MMOD_HTTP_TIMEOUT_CONNECT  NUMBER(5,0);

ALTER TABLE MMOD ADD MMOD_HTTP_TIMEOUT_SEND     NUMBER(5,0);

ALTER TABLE MMOD ADD MMOD_HTTP_TIMEOUT_RECEIVE  NUMBER(5,0);

COMMENT ON COLUMN MMOD.MMOD_HTTP_TIMEOUT_RESOLVE IS 'Resolve timeout for http communication.';

COMMENT ON COLUMN MMOD.MMOD_HTTP_TIMEOUT_CONNECT IS 'connect timeout for http communication';

COMMENT ON COLUMN MMOD.MMOD_HTTP_TIMEOUT_SEND IS 'send timeout for http communication';

COMMENT ON COLUMN MMOD.MMOD_HTTP_TIMEOUT_RECEIVE IS 'receive timeout for http communication';

begin
DECLARE 
   cursor mapperlst is select mmod_id, mmod_vendor_id from mmod where mmod_vendor_id = 'ORS' or mmod_vendor_id = 'EXPED' order by mmod_id;
   cursor ratecodelst is select yrch_id, yrch_webenabled, yrch_zcur_id from yrch where yrch_webenabled = 1;

   fill mapperlst%rowtype;
   fill1 ratecodelst%rowtype; 
   begin
       for fill in mapperlst loop
          for fill1 in ratecodelst loop
            insert into mavl (mavl.MAVL_ID     , mavl.MAVL_MMOD_ID , mavl.MAVL_TYPE , mavl.MAVL_CODE_ID , mavl.MAVL_INACTIVE , mavl.MAVL_CUR_ID) 
            values           (seq_mavl.nextval , fill.mmod_id      , 'RC'           , fill1.yrch_id     , 0                  , fill1.yrch_zcur_id);
          end loop;
       end loop;
    
   end;
end;
/

ALTER TABLE XCMS MODIFY XCMS_CONTACTPREF NUMBER(30);

ALTER TABLE MWSV MODIFY MWSV_SERVICE_NAME VARCHAR2(100);

ALTER TABLE MMOD ADD MMOD_FTP_PATH VARCHAR2(100);

COMMENT ON COLUMN MMOD.MMOD_FTP_PATH IS 'FTP path';

DELETE FROM WUSS WHERE WUSS_XCMS_ID=0 AND WUSS_NAME='DisplayDoubleOccupancy';

INSERT INTO WUSS (WUSS_ID,WUSS_XCMS_ID,WUSS_NAME,WUSS_VALUE) VALUES (SEQ_WUSS.NEXTVAL, 0, 'DisplayDoubleOccupancy', '1');

ALTER TABLE MMOD ADD MMOD_FTP_PATH1 VARCHAR2(100);

COMMENT ON COLUMN MMOD.MMOD_FTP_PATH1 IS 'FTP Output path';

ALTER TABLE SAAR ADD (
  SAAR_AINV_ID NUMBER(30),
  SAAR_ADJUST_AINV_ID NUMBER(30),
  SAAR_REMARKS VARCHAR2(50)
);

ALTER TABLE MMOD ADD MMOD_USE_NET_RATES NUMBER(1,0);

COMMENT ON COLUMN MMOD.MMOD_USE_NET_RATES IS 'Indicates the use of net rates. Default is gross rates';

ALTER TABLE MMOD ADD MMOD_HTTP_DOWNLOAD NUMBER(1,0);

COMMENT ON COLUMN MMOD.MMOD_HTTP_DOWNLOAD IS 'Indicates whether the listener is used also for downloads';

COMMENT ON COLUMN YHKS.YHKS_IFC_STATUS IS 'Obsolete column, YFVT is used instead';

ALTER TABLE XSCD MODIFY (XSCD_HTML_NAME VARCHAR(128));

ALTER TABLE SAAR DROP COLUMN SAAR_ADJUST_AINV_ID;

ALTER TABLE ZALL ADD ZALL_XCMS_ID NUMBER(30);

COMMENT ON COLUMN ZALL.ZALL_XCMS_ID IS 'xcms id of a guest linked by multiprofile or main guest id if not available';

UPDATE ZALL SET ZALL_XCMS_ID=(SELECT YRES_XCMS_ID FROM YRES WHERE YRES_ID=ZALL_YRES_ID) WHERE ZALL_XCMS_ID IS NULL;

ALTER TABLE ZALL MODIFY ZALL_XCMS_ID NOT NULL;
 
ALTER TABLE ZALL ADD ZALL_XCAC_ID NUMBER(30); 

ALTER TABLE ZALL ADD ZALL_XCACINDEX NUMBER(3);

COMMENT ON COLUMN ZALL.ZALL_XCAC_ID IS 'zall_xcac_id and zall_xcacindex actually link to yrga but yrga can be deleted and recreated for the same combination and i want to avoid frequent allowance modifications so i better link by these fields';

COMMENT ON COLUMN ZALL.ZALL_XCACINDEX IS 'zall_xcac_id and zall_xcacindex actually link to yrga but yrga can be deleted and recreated for the same combination and i want to avoid frequent allowance modifications so i better link by these fields';

ALTER TABLE ZFAC ADD ZFAC_ZTXX_ID NUMBER(30);

COMMENT ON COLUMN ZLOG.ZLOG_TYPE IS '0-transfer, 1-negative posting, 2-posting split, 3-posting delete, 4-posting correction, 5-rebate posting, 6-posting adjustment, 7-Tax exemption, 8-Recalc Tax after Exemption';

ALTER TABLE ZALL ADD ZALL_DESC VARCHAR2(30);

COMMENT ON COLUMN ZALL.ZALL_DESC IS 'Some description to be able to show something meaningful on screen for messages ie when allowance gets deleted';

UPDATE ZALL SET ZALL_DESC='Allowance' WHERE ZALL_DESC IS NULL;

ALTER TABLE ZALL MODIFY ZALL_DESC NOT NULL;

UPDATE YPAC SET YPAC_TOTIME=TO_DATE('30.12.1899 23:59:59','dd.mm.yyyy HH24:MI:SS') WHERE YPAC_ALLOWANCED=1 AND (YPAC_TOTIME IS NULL OR YPAC_TOTIME=TRUNC(YPAC_TOTIME));

UPDATE ZALL SET ZALL_TOTIME=TO_DATE('30.12.1899 23:59:59','dd.mm.yyyy HH24:MI:SS') WHERE ZALL_TOTIME=TRUNC(ZALL_TOTIME);

DELETE FROM YRCT WHERE EXISTS (SELECT 1 FROM YRCD,YCAT WHERE YRCD.YRCD_ID=YRCT.YRCT_YRCD_ID AND YRCT.YRCT_YCAT_ID=YCAT.YCAT_ID AND YCAT.YCAT_DISABLED=1);

UPDATE MMOD SET MMOD.MMOD_HTTP_DOWNLOAD=MMOD.MMOD_ONEWAY WHERE MMOD.MMOD_HTTP_DOWNLOAD IS NULL;

CREATE TABLE XPCL (
    XPCL_ID NUMBER(30) NOT NULL
   ,XPCL_XPAC_ID NUMBER(30) NOT NULL
   ,XPCL_XCED_ID NUMBER(30) NOT NULL
   ,CONSTRAINT XPCL_PK PRIMARY KEY (XPCL_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

CREATE SEQUENCE SEQ_xpcl INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

CREATE TABLE XGCL (
    XGCL_ID NUMBER(30) NOT NULL
   ,XGCL_XPAC_ID NUMBER(30) NOT NULL
   ,XGCL_WEGR_ID NUMBER(30) NOT NULL
   ,CONSTRAINT XGCL_PK PRIMARY KEY (XGCL_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

CREATE SEQUENCE SEQ_xgcl INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

ALTER TABLE WUSS MODIFY WUSS_VALUE NULL;

UPDATE YRCD SET YRCD_PPPN=0 WHERE YRCD_PPPN IS NULL;

UPDATE YRCD SET YRCD_PPPS=0 WHERE YRCD_PPPS IS NULL;

UPDATE YRCD SET YRCD_PRPN=0 WHERE YRCD_PRPN IS NULL;

UPDATE YRCD SET YRCD_PRPS=0 WHERE YRCD_PRPS IS NULL;

UPDATE YRCD SET YRCD_YPRM_ID=0 WHERE YRCD_YPRM_ID IS NULL;

UPDATE YRCH SET YRCH_PPPN=0 WHERE YRCH_PPPN IS NULL;

UPDATE YRCH SET YRCH_PPPS=0 WHERE YRCH_PPPS IS NULL;

UPDATE YRCH SET YRCH_PRPN=0 WHERE YRCH_PRPN IS NULL;

UPDATE YRCH SET YRCH_PRPS=0 WHERE YRCH_PRPS IS NULL;

UPDATE YRCH SET YRCH_INACTIVE=0 WHERE YRCH_INACTIVE IS NULL;

UPDATE YRCH SET YRCH_XCMA_ID=0 WHERE YRCH_XCMA_ID IS NULL;

UPDATE YRCH SET YRCH_ZDCO_ID=0 WHERE YRCH_ZDCO_ID IS NULL;

UPDATE YRCH SET YRCH_WEEKEND_ZDCO_ID=0 WHERE YRCH_WEEKEND_ZDCO_ID IS NULL;

UPDATE YRCH SET YRCH_YRDS_ID=0 WHERE YRCH_YRDS_ID IS NULL;

UPDATE YRCH SET YRCH_CALCMETHOD=0 WHERE YRCH_CALCMETHOD IS NULL;

UPDATE YRCH SET YRCH_XPDA_ID=0 WHERE YRCH_XPDA_ID IS NULL;

UPDATE YRCH SET YRCH_YIELDABLE=0 WHERE YRCH_YIELDABLE IS NULL;

UPDATE YRCH SET YRCH_ZCUR_ID=0 WHERE YRCH_ZCUR_ID IS NULL;

UPDATE YRCH SET YRCH_MIN_LOS=0 WHERE YRCH_MIN_LOS IS NULL;

UPDATE YRCH SET YRCH_MAX_LOS=0 WHERE YRCH_MAX_LOS IS NULL;

UPDATE YRCH SET YRCH_ADV_BOOK=0 WHERE YRCH_ADV_BOOK IS NULL;

UPDATE YRCH SET YRCH_RHYTHM=0 WHERE YRCH_RHYTHM IS NULL;

ALTER TABLE ZDCO ADD ZDCO_FOREIGN_CC_ZCUR_ID NUMBER(30);

CREATE TABLE YRVL
(
  YRVL_ID            NUMBER (30),
  YRVL_SHORTDESC     VARCHAR2 (4),
  YRVL_LONGDESC      VARCHAR2 (60),
  YRVL_DISPLORDER    NUMBER (4),
  YRVL_INACTIVE      NUMBER (1), CONSTRAINT YRVL_PK PRIMARY KEY (YRVL_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

CREATE SEQUENCE SEQ_YRVL INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

COMMENT ON TABLE YRVL IS 'Rate Availability Levels'; 

ALTER TABLE YRCH ADD YRCH_YRVL_ID NUMBER (30);

COMMENT ON COLUMN YRCH.YRCH_YRVL_ID IS 'Rate Availability Level Link';

UPDATE YRCH SET YRCH_YRVL_ID=0 WHERE YRCH_YRVL_ID IS NULL;

ALTER TABLE YRCH ADD YRCH_BARRATE NUMBER (1);

COMMENT ON COLUMN YRCH.YRCH_BARRATE IS 'Rate code is available for BAR Yield management';

CREATE TABLE YBAR (
YBAR_ID          NUMBER (30),
YBAR_BARCODE     VARCHAR2 (10),
YBAR_ARRIVALDATE DATE,
YBAR_LOS         NUMBER(3),  CONSTRAINT YBAR_PK PRIMARY KEY (YBAR_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

CREATE SEQUENCE SEQ_YBAR INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

COMMENT ON TABLE YBAR IS 'BAR Rate interface table'; 

ALTER TABLE YRVL ADD YRVL_BARCODE varchar2(10);

COMMENT ON COLUMN YRVL.YRVL_BARCODE IS 'BAR Interface barcode link'; 

CREATE TABLE ULAT(
  ULAT_ID NUMBER(30) NOT NULL,
  ULAT_XCMS_ID NUMBER(30),
  ULAT_WATY_ID NUMBER(30),
  CONSTRAINT ULAT_PK PRIMARY KEY(ULAT_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;
 
CREATE SEQUENCE SEQ_ULAT INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;  

COMMENT ON COLUMN ULAT.ULAT_ID IS 'Unique ID';

COMMENT ON COLUMN ULAT.ULAT_XCMS_ID IS 'User ID';

COMMENT ON COLUMN ULAT.ULAT_WATY_ID IS 'Act/Task Type ID';

COMMENT ON TABLE ULAT IS 'User Setting for activity/task types to be displayed in Profile Tree';

ALTER TABLE ZRDL ADD (ZRDL_XCMS_ID NUMBER(30) NULL);

COMMENT ON COLUMN ZRDL.ZRDL_XCMS_ID IS 'Link to Profile';

ALTER TABLE ZRDL ADD (ZRDL_YBOM_ID NUMBER(30) NULL);

COMMENT ON COLUMN ZRDL.ZRDL_XCMS_ID IS 'Link to CCM Booking';

ALTER TABLE YEBS ADD (YEBS_REBATE_PERC NUMBER(3) NULL);

COMMENT ON COLUMN YEBS.YEBS_REBATE_PERC IS 'Percentage of rebate';

ALTER TABLE YEBS ADD (YEBS_ORG_SPECIALRATE NUMBER(30,4) NULL);

COMMENT ON COLUMN YEBS.YEBS_ORG_SPECIALRATE IS 'Original rate';

ALTER TABLE YEBR ADD (YEBR_REBATE_PERC NUMBER(3) NULL);

COMMENT ON COLUMN YEBR.YEBR_REBATE_PERC IS 'Percentage of rebate';

ALTER TABLE YEBR ADD (YEBR_ORG_MANUALPRICE NUMBER(30,4) NULL);

COMMENT ON COLUMN YEBR.YEBR_ORG_MANUALPRICE IS 'Original price';

ALTER TABLE YEMI ADD (YEMI_REBATE_PERC NUMBER(3) NULL);

COMMENT ON COLUMN YEMI.YEMI_REBATE_PERC IS 'Percentage of rebate';

ALTER TABLE YEMI ADD (YEMI_ORG_PRICE NUMBER(30,4) NULL);

COMMENT ON COLUMN YEMI.YEMI_ORG_PRICE IS 'Original price';

ALTER TABLE YMRD ADD (YMRD_REBATE_PERC NUMBER(3) NULL);

COMMENT ON COLUMN YMRD.YMRD_REBATE_PERC IS 'Percentage of rebate';

ALTER TABLE YMRD ADD (YMRD_ORG_AMOUNT NUMBER(30,4) NULL);

COMMENT ON COLUMN YMRD.YMRD_ORG_AMOUNT IS 'Original amount';

ALTER TABLE YBEF ADD YBEF_REBATE_PERC NUMBER(3);

COMMENT ON COLUMN YBEF.YBEF_REBATE_PERC IS 'Rebate Percentage';

ALTER TABLE YBEF ADD YBEF_ORG_REV_AMOUNT NUMBER(30, 4);

COMMENT ON COLUMN YBEF.YBEF_ORG_REV_AMOUNT IS 'Original Amount';

ALTER TABLE YEBS ADD YEBS_REBATE_FLAT NUMBER(30,4);

COMMENT ON COLUMN YEBS.YEBS_REBATE_FLAT IS 'Rebate flat amount';

ALTER TABLE YEBR ADD YEBR_REBATE_FLAT NUMBER(30, 4);

COMMENT ON COLUMN YEBR.YEBR_REBATE_FLAT IS 'Rebate flat amount';

ALTER TABLE YMRD ADD YMRD_REBATE_FLAT NUMBER(30, 4);

COMMENT ON COLUMN YMRD.YMRD_REBATE_FLAT IS 'Rebate flat amount';

ALTER TABLE YEMI ADD YEMI_REBATE_FLAT NUMBER(30, 4);

COMMENT ON COLUMN YEMI.YEMI_REBATE_FLAT IS 'Rebate flat amount';

ALTER TABLE YBEF ADD YBEF_REBATE_FLAT NUMBER(30, 4);

COMMENT ON COLUMN YBEF.YBEF_REBATE_FLAT IS 'Rebate flat amount';

ALTER TABLE ZRDF ADD ZRDF_BOOKING NUMBER(1);

COMMENT ON COLUMN ZRDF.ZRDF_BOOKING IS 'Valid for bookings';

ALTER TABLE ZRDF ADD ZRDF_RESERVATION NUMBER(1);

COMMENT ON COLUMN ZRDF.ZRDF_RESERVATION IS 'Valid for reservations';

DELETE FROM WUSS WHERE WUSS_NAME LIKE 'RebateMasterPostingOnly' and wuss_xcms_id=0;

INSERT INTO WUSS SELECT SEQ_WUSS.NEXTVAL, A.WUSS_XCMS_ID, 'RebateMasterPostingOnly', A.WUSS_VALUE FROM WUSS A WHERE A.WUSS_NAME='EnableRebate';

CREATE TABLE YHHC (
    YHHC_ID NUMBER(30) NOT NULL
   ,YHHC_ROLE NUMBER(1) NOT NULL
   ,YHHC_SHORTDESC VARCHAR2(3) NOT NULL
   ,YHHC_LONGDESC VARCHAR2(30) NOT NULL
   ,CONSTRAINT YHHC_PK PRIMARY KEY (YHHC_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

COMMENT ON TABLE YHHC IS 'Attendant Types';

COMMENT ON COLUMN YHHC.YHHC_ROLE IS '0 = Maid, 1 = Housekeeper';

CREATE SEQUENCE SEQ_YHHC INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

ALTER TABLE YHAT ADD (YHAT_YHHC_ID NUMBER(30));

INSERT INTO YHHC VALUES (1, 0, 'MAI', 'Room Maid');

UPDATE YHAT SET YHAT_YHHC_ID=1 WHERE YHAT_YHHC_ID IS NULL;

ALTER TABLE YHAT MODIFY YHAT_YHHC_ID NOT NULL;

ALTER TABLE YHHC ADD YHHC_WRPT_ID NUMBER(30);

ALTER TABLE YHHC ADD YHHC_DEFAULT NUMBER(1);

COMMENT ON COLUMN YHHC.YHHC_DEFAULT IS '1 - default housekeeping group, only 1 default is allowed. 0 - if not default';

UPDATE YHHC SET YHHC_DEFAULT = 1 WHERE YHHC_DEFAULT IS NULL;

ALTER TABLE YHHC MODIFY YHHC_DEFAULT NOT NULL;  

ALTER TABLE YHRL ADD YHRL_YHHC_ID NUMBER(30);

ALTER TABLE WHDE ADD WHDE_ROLE NUMBER(1);

COMMENT ON COLUMN WHDE.WHDE_ROLE IS '1 - Housekeeping';

ALTER TABLE YAMN ADD (YAMN_ROLE NUMBER(1), YAMN_HSK_CREDITS NUMBER(3)); 

COMMENT ON COLUMN YAMN.YAMN_ROLE IS '1 - Linen Change, 2 - Towel Change';

COMMENT ON COLUMN YAMN.YAMN_HSK_CREDITS IS 'housekeeping credits';

CREATE TABLE YHRA
(
  YHRA_ID        NUMBER(30), 
  YHRA_YHRL_ID   NUMBER(30) NOT NULL,
  YHRA_YAMN_ID   NUMBER(30) NOT NULL,
  YHRA_CREDITS   NUMBER(3)
  ,CONSTRAINT YHRA_PK PRIMARY KEY (YHRA_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

COMMENT ON TABLE YHRA IS 'Attendant plan link to Amenities';

CREATE SEQUENCE SEQ_YHRA INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

ALTER TABLE WDCL MODIFY WDCL_FILENAME VARCHAR2(400 CHAR);
