--UPDATE FROM 8.7.2.0 TO 8.7.2.1


DROP TABLE VERSION_8_7_2_0;



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


CREATE TABLE WMAA (
	WMAA_id NUMBER(30,0) NOT NULL,
	WMAA_WMAI_id NUMBER(30,0) NOT NULL,
	WMAA_FILENAME VARCHAR2(128) NOT NULL,
	WMAA_ATTACHMENT_WTXT_ID NUMBER(30,0) NOT NULL,
	CONSTRAINT WMAA_PK PRIMARY KEY (WMAA_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN ;

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

CREATE INDEX WMAA_WMAI_ID ON WMAA(WMAA_WMAI_ID) TABLESPACE V8INDEX; 

COMMENT ON TABLE WMAA IS 'Email attachments';

COMMENT ON COLUMN WMAA.WMAA_ID IS 'WMAA PK';

COMMENT ON COLUMN WMAA.WMAA_WMAI_ID IS 'Attachment link to the email';

COMMENT ON COLUMN WMAA.WMAA_FILENAME IS 'Attachment file name';

COMMENT ON COLUMN WMAA.WMAA_ATTACHMENT_WTXT_ID IS 'link to the binary storage';

COMMENT ON COLUMN WTXT.WTXT_DOCFORMAT IS ' 0/null - Ms Word Format; 1-Text; 2-Acrobat PDF; 3-HTML; 4-RTF; 5-MHTML; 6-Unknown. Currently used to store any email attachment ';

ALTER TABLE XMTY ADD XMTY_RATEQUERY NUMBER (1);

COMMENT ON COLUMN XMTY.XMTY_RATEQUERY IS 'Allow for searching on rate query screen ';

ALTER TABLE XJET DROP COLUMN XJET_USE_COUNTRY_CODE;

ALTER TABLE XJET ADD XJET_LAND_COUNTRY_CODE NUMBER(1);

ALTER TABLE XJET ADD XJET_STAAT_COUNTRY_CODE NUMBER(1);

ALTER TABLE XJET ADD XJET_NATION_COUNTRY_CODE NUMBER(1);

