--UPDATE FROM 8.8.3.1 TO 8.8.3.2


DROP TABLE VERSION_8_8_3_1;



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


ALTER TABLE YHAC MODIFY YHAC_COMMENT VARCHAR2(4000 CHAR);

CREATE TABLE WIML(
  WIML_ID           NUMBER(30)                  NOT NULL,
  WIML_TABLENAME    CHAR(4 BYTE)                NOT NULL,
  WIML_TABLEID      NUMBER(30)                  NOT NULL,
  WIML_DESCRIPTION  VARCHAR2(60 BYTE),
  WIML_IMAGETYPE    NUMBER(1)                   NOT NULL,
  WIML_WIMG_ID      NUMBER(30)                  NOT NULL,
  WIML_WEBENABLED   NUMBER(1),
  CONSTRAINT WIML_PK PRIMARY KEY (WIML_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

COMMENT ON TABLE WIML IS 'Tables and Images Link Table'; 

COMMENT ON COLUMN WIML.WIML_ID IS 'WIML ID';

COMMENT ON COLUMN WIML.WIML_TABLENAME IS 'Linked Table Name';

COMMENT ON COLUMN WIML.WIML_TABLEID IS 'Record id from the linked table';

COMMENT ON COLUMN WIML.WIML_IMAGETYPE  IS '0.Web Picture,  1.Mobile Device Picture, 2.Thumbnail';

COMMENT ON COLUMN WIML.WIML_WIMG_ID  IS 'Linked image id';

COMMENT ON COLUMN WIML.WIML_WEBENABLED  IS '1. available in web';

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

ALTER TABLE YCET ADD YCET_WEBENABLED NUMBER(1);

ALTER TABLE YCEV ADD YCEV_WEBENABLED NUMBER(1);

ALTER TABLE YCEV ADD YCEV_SHORTWEBINFO VARCHAR2(1000);

ALTER TABLE YCEV ADD YCEV_LONGWEBINFO VARCHAR2(2000);

ALTER TABLE YCEV ADD YCEV_MD_SHORTWEBINFO VARCHAR2(1000);

ALTER TABLE YCEV ADD YCEV_MD_LONGWEBINFO VARCHAR2(2000);

COMMENT ON COLUMN YCEV.YCEV_SHORTWEBINFO  IS 'Web Short Information';

COMMENT ON COLUMN YCEV.YCEV_LONGWEBINFO  IS 'Web Long Information';

COMMENT ON COLUMN YCEV.YCEV_MD_SHORTWEBINFO  IS 'Web Short Information for Mobile Device';

COMMENT ON COLUMN YCEV.YCEV_MD_LONGWEBINFO  IS 'Web Long Information for Mobile Device';

ALTER TABLE YCAT ADD YCAT_LONGWEBINFO VARCHAR2(2000);

ALTER TABLE YCAT ADD YCAT_MD_SHORTWEBINFO VARCHAR2(1000);

ALTER TABLE YCAT ADD YCAT_MD_LONGWEBINFO VARCHAR2(2000);

ALTER TABLE YCAT ADD YCAT_EXTENDEDWEBINFO VARCHAR2(2000);

ALTER TABLE YCAT ADD YCAT_MD_EXTENDEDWEBINFO VARCHAR2(2000);

COMMENT ON COLUMN YCAT.YCAT_SHORTWEBINFO  IS 'Web Short Information';

COMMENT ON COLUMN YCAT.YCAT_LONGWEBINFO  IS 'Web Long Information';

COMMENT ON COLUMN YCAT.YCAT_MD_SHORTWEBINFO  IS 'Web Short Information for Mobile Device';

COMMENT ON COLUMN YCAT.YCAT_MD_LONGWEBINFO  IS 'Web Long Information for Mobile Device';

COMMENT ON COLUMN YCAT.YCAT_EXTENDEDWEBINFO IS 'Extended Web Information';

COMMENT ON COLUMN YCAT.YCAT_MD_EXTENDEDWEBINFO IS 'Extended Web Information for Mobile Device';

ALTER TABLE YRCH ADD YRCH_LONGWEBINFO VARCHAR2(2000);

ALTER TABLE YRCH ADD YRCH_MD_SHORTWEBINFO VARCHAR2(1000);

ALTER TABLE YRCH ADD YRCH_MD_LONGWEBINFO VARCHAR2(2000);

COMMENT ON COLUMN YRCH.YRCH_WEBINFO  IS 'Web Short Information';

COMMENT ON COLUMN YRCH.YRCH_LongWEBINFO  IS 'Web Long Information';

COMMENT ON COLUMN YRCH.YRCH_MD_SHORTWEBINFO  IS 'Web Short Information for Mobile Device';

COMMENT ON COLUMN YRCH.YRCH_MD_LONGWEBINFO  IS 'Web Long Information for Mobile Device';

ALTER TABLE YPAC ADD YPAC_LONGWEBINFO VARCHAR2(2000);

ALTER TABLE YPAC ADD YPAC_MD_SHORTWEBINFO VARCHAR2(1000);

ALTER TABLE YPAC ADD YPAC_MD_LONGWEBINFO VARCHAR2(2000);

COMMENT ON COLUMN YPAC.YPAC_WEBINFO  IS 'Web Short Information';

COMMENT ON COLUMN YPAC.YPAC_LongWEBINFO  IS 'Web Long Information';

COMMENT ON COLUMN YPAC.YPAC_MD_SHORTWEBINFO  IS 'Web Short Information for Mobile Device';

COMMENT ON COLUMN YPAC.YPAC_MD_LONGWEBINFO  IS 'Web Long Information for Mobile Device';

ALTER TABLE YPFR ADD YPFR_SHORTWEBINFO VARCHAR2(1000);

ALTER TABLE YPFR ADD YPFR_MD_SHORTWEBINFO VARCHAR2(1000);

COMMENT ON COLUMN YPFR.YPFR_SHORTWEBINFO  IS 'Web Information';

COMMENT ON COLUMN YPFR.YPFR_MD_SHORTWEBINFO IS 'Web Information for Mobile Device';

ALTER TABLE XPAC ADD XPAC_WEBENABLED NUMBER(1);

COMMENT ON COLUMN XPAC.XPAC_WEBENABLED IS 'flag to include this category in Suite8 Homepage';

ALTER TABLE XPDA ADD XPDA_WEBENABLED NUMBER(1);

COMMENT ON COLUMN  XPDA.XPDA_WEBENABLED IS 'Flag to include this attribute in Suite8 Homepage';

ALTER TABLE RTAB MODIFY RTAB_NUMBER NUMBER(4);

ALTER TABLE RTAB MODIFY RTAB_DISPLORDER NUMBER(4);

ALTER TABLE XPDA MODIFY XPDA_DISPLORDER NUMBER(4);

ALTER TABLE WTRL MODIFY WTRL_VALUE VARCHAR2(2000);

DELETE FROM XCCS WHERE XCCS_XCMS_ID IN (SELECT XCED_ID FROM XCED);

ALTER TABLE XJET ADD XJET_DELIVERYMETHOD NUMBER(1); 

COMMENT ON COLUMN XJET.XJET_DELIVERYMETHOD IS '0 = JetWeb DLL, 1 = HTTP, 2 = File Export';

ALTER TABLE XJET ADD XJET_EXPORTPATH VARCHAR(60);

ALTER TABLE XJET ADD XJET_EXPORTONEFILE NUMBER(1);

ALTER TABLE YRCH MODIFY YRCH_RATEINFO VARCHAR2(2000); 

CREATE TABLE YALT (
  YALT_ID NUMBER(30) NOT NULL,
  YALT_TABLELINKEDTO VARCHAR2(4),
  YALT_TABLE_ID NUMBER(30),
  YALT_ALTERNATIVE_ID NUMBER(30),
  CONSTRAINT YALT_PK PRIMARY KEY (YALT_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;
  
COMMENT ON COLUMN YALT.YALT_ID IS 'ID';

COMMENT ON COLUMN YALT.YALT_TABLELINKEDTO IS 'YEBS, YEBR, YEMN, YEMI, YEVM, YPKD, YETB';

COMMENT ON COLUMN YALT.YALT_TABLE_ID IS 'ID to which alternatives are defined';

COMMENT ON COLUMN YALT.YALT_ALTERNATIVE_ID IS 'ID of alternative';
 
CREATE SEQUENCE SEQ_YALT INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

ALTER TABLE YPKD ADD YPKD_ALTERNATIVE NUMERIC(1) DEFAULT 0;

ALTER TABLE YETB ADD YETB_ALTERNATIVE NUMERIC(1) DEFAULT 0;

ALTER TABLE YEVM ADD YEVM_ALTERNATIVE NUMERIC(1) DEFAULT 0;

ALTER TABLE YEBS ADD YEBS_ALTERNATIVE NUMERIC(1) DEFAULT 0;

ALTER TABLE YEBR ADD YEBR_ALTERNATIVE NUMERIC(1) DEFAULT 0;

ALTER TABLE YEMN ADD YEMN_ALTERNATIVE NUMERIC(1) DEFAULT 0;

ALTER TABLE YEMI ADD YEMI_ALTERNATIVE NUMERIC(1) DEFAULT 0;

ALTER TABLE YBEF ADD YBEF_ALTERNATIVE NUMBER(1);

COMMENT ON COLUMN YBEF.YBEF_ALTERNATIVE IS 'Alternative';

ALTER TABLE YPKD ADD YPKD_DISPLORDER NUMBER(30);

COMMENT ON COLUMN YPKD.YPKD_DISPLORDER IS 'Package display order';

ALTER TABLE YETB ADD YETB_DISPLORDER NUMBER(30);

COMMENT ON COLUMN YETB.YETB_DISPLORDER IS 'Event group display order';
