--UPDATE FROM 8.8.3.0 TO 8.8.3.1


DROP TABLE VERSION_8_8_3_0;



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


ALTER TABLE PTIK ADD PTIK_INTERFACEACCESSCODE VARCHAR2(10);

COMMENT ON COLUMN PTIK.PTIK_INTERFACEACCESSCODE IS 'Interface Access Code Value';

ALTER TABLE WQNR MODIFY WQNR_LONGDESC VARCHAR2 (60);

CREATE TABLE WQUG (
  WQUG_ID NUMBER (30) NOT NULL,
  WQUG_SHORTDESC VARCHAR2 (10),
  WQUG_LONGDESC VARCHAR2 (30),
  WQUG_DISPLORDER NUMBER(3),
  WQUG_INACTIVE NUMBER(1),
CONSTRAINT WQUG_PK PRIMARY KEY (WQUG_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

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

COMMENT ON TABLE WQUG IS 'Question Groups';

ALTER TABLE WQNL ADD WQNL_WQUG_ID NUMBER (30);

ALTER TABLE QNRA ADD QNRA_WQNL_ID NUMBER (30);

ALTER TABLE WQNL ADD WQNL_GROUPORDER NUMBER (4);

COMMENT ON COLUMN WQNL.WQNL_GROUPORDER IS 'Displayorder of the Question groups';

ALTER TABLE QNRA ADD QNRA_WQNL_ID NUMBER(30);

COMMENT ON COLUMN QNRA.QNRA_WQNL_ID IS 'Answer link to questionare';

UPDATE QNRA SET QNRA_WQNL_ID=(SELECT WQNL_ID FROM WQNL, WQNR, QNRA A, QNRF
      WHERE A.QNRA_QNRF_ID=QNRF_ID
      AND QNRF_WQNR_ID=WQNR_ID
      AND WQNL_WQNR_ID=WQNR_ID
      AND WQNL_WQUE_ID=A.QNRA_WQUE_ID AND QNRA.QNRA_ID=A.QNRA_ID), QNRA_WQUE_ID=NULL
      WHERE QNRA_WQUE_ID IS NOT NULL;

ALTER TABLE YPKG MODIFY YPKG_SHORTDESC VARCHAR2(4);

ALTER TABLE WPCA ADD WPCA_PMS_LAST_VERSION VARCHAR2 (15);

COMMENT ON COLUMN WPCA.WPCA_PMS_LAST_VERSION IS 'last PMS Version used in this workstation';
 
ALTER TABLE PTIK ADD PTIK_TICKETCREATIONLEVEL NUMBER(3);

COMMENT ON COLUMN PTIK.PTIK_TICKETCREATIONLEVEL IS 'Ticket Creation Level';

ALTER TABLE XCED ADD XCED_TICKETCREATIONLEVEL NUMBER(3);

COMMENT ON COLUMN XCED.XCED_TICKETCREATIONLEVEL IS 'Ticket Creation Level, will be compared to the ticket''s level on creating a new transponder';

ALTER TABLE PTIK ADD (PTIK_EXCLUSIVE_XCMS_ID NUMBER(30), PTIK_EXCLUSIVE_PAYMENT_ZDCO_ID NUMBER(30));

COMMENT ON COLUMN PTIK.PTIK_EXCLUSIVE_XCMS_ID IS 'Ticket Checkout Limitations, if set, the ticket can only be checked out to this profile';

COMMENT ON COLUMN PTIK.PTIK_EXCLUSIVE_PAYMENT_ZDCO_ID IS 'Ticket Checkout Limitations, if set, the ticket can only be checked out using this payment department code';

ALTER TABLE YRCH MODIFY YRCH_WEBINFO VARCHAR2(2000);

ALTER TABLE MMOD ADD MMOD_HTTP_URL2 VARCHAR2(100);

COMMENT ON COLUMN MMOD.MMOD_HTTP_URL2 IS '3rd URL used by Expedia for booking Confirmation reqeust';

ALTER TABLE MQU4 ADD MQU4_RESEND NUMBER(1,0);

COMMENT ON COLUMN MQU4.MQU4_RESEND IS 'Indicates whether message could not yet be sent';

ALTER TABLE PTIK ADD PTIK_DONT_SEND_IFC NUMBER(1);

COMMENT ON COLUMN PTIK.PTIK_DONT_SEND_IFC IS '1. do not send Key interface commands for this Ticket type';

ALTER TABLE ZDCO ADD ZDCO_COMMENTDISABLED NUMERIC(1) DEFAULT 0;

COMMENT ON COLUMN ZDCO.ZDCO_COMMENTDISABLED IS '0 = ZPOS_COMMENT shown on invoice, 1 = ZPOS_COMMENT hidden on invoice';

DELETE FROM WUSS WHERE WUSS.WUSS_NAME LIKE 'infofolioonlyonce';

ALTER TABLE YEBR ADD YEBR_NOOFPAX NUMBER(1) DEFAULT 0;

COMMENT ON COLUMN YEBR.YEBR_NOOFPAX IS 'Per Person 1=Yes';

UPDATE YEBR SET YEBR_NOOFPAX=(SELECT YCIT_NOOFPAX FROM YCIT WHERE YCIT_ID=YEBR_YCIT_ID) 
WHERE YEBR_ID IN (SELECT YEBR_ID FROM YEBR, YEVM, YCIT WHERE YEBR_YEVM_ID=YEVM_ID AND YEBR_YCIT_ID=YCIT_ID AND NVL(YCIT_NOOFPAX,0)=1 AND YEVM_NOOFATTENDEES = YEBR_QUANTITY);

ALTER TABLE MCFG ADD MCFG_SVC_MAX_MEM NUMBER(4,0);

COMMENT ON COLUMN MCFG.MCFG_SVC_MAX_MEM IS 'Indicates the maximum memory amount a service can use before the monitor restarts the service';

ALTER TABLE MCFG ADD MCFG_MON_LOGLEVEL NUMBER(1,0);

COMMENT ON COLUMN MCFG.MCFG_MON_LOGLEVEL IS 'logging level for the interface monitor';
