--UPDATE FROM 8.9.5.2 TO 8.9.5.3


DROP TABLE VERSION_8_9_5_2;


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

CREATE TABLE YCRN (
   YCRN_ID NUMBER(30) NOT NULL
  ,YCRN_YRES_ID NUMBER(30) NOT NULL
  ,YCRN_CRSSYSTEM VARCHAR2(30) NOT NULL
  ,YCRN_CRSRESNR VARCHAR2(50) NULL  
  ,CONSTRAINT YCRN_PK PRIMARY KEY (YCRN_ID) USING INDEX TABLESPACE V8INDEX
) TABLESPACE V8MAIN;

COMMENT ON TABLE YCRN IS 'Third party CRS id for reservation';

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

ALTER TABLE YCRN MODIFY YCRN_CRSRESNR NULL;

ALTER TABLE YRES ADD YRES_CRSMAIN NUMBER(1);

COMMENT ON COLUMN YRES.YRES_CRSMAIN IS 'Main reservation of sharers when uploading them as a single reservation to crs systems'; 

ALTER TABLE ZITR MODIFY ZITR_INFO VARCHAR2(100);

ALTER TABLE ZIPT MODIFY ZIPT_INFO VARCHAR2(100);

ALTER TABLE YRDB ADD YRDB_TENTATIVERES NUMBER(1) DEFAULT 0 NOT NULL;

ALTER TABLE YPRM ADD YPRM_WEBLONG VARCHAR2 (1000);

COMMENT ON COLUMN YPRM.YPRM_WEBLONG IS 'web long description';

CREATE TABLE WLIB (
   WLIB_ID NUMBER(30) NOT NULL
  ,WLIB_TIMESTAMP DATE NOT NULL
  ,WLIB_HASH VARCHAR2(32)
  ,WLIB_DATA CLOB NOT NULL
  ,CONSTRAINT WLIB_PK PRIMARY KEY (WLIB_ID) USING INDEX TABLESPACE V8INDEX
) TABLESPACE V8MAIN;   

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