--UPDATE FROM 8.7.4.2 TO 8.7.4.3


DROP TABLE VERSION_8_7_4_2;



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

ALTER TABLE MCNV ADD (MCNV_INACTIVE NUMBER(1,0) NULL);

COMMENT ON COLUMN MCNV.MCNV_INACTIVE IS 'indicates the use of this value for conversion.';

UPDATE MCNV SET MCNV_INACTIVE = 0 WHERE MCNV_INACTIVE IS NULL;

CREATE TABLE MPRO
(
  MPRO_ID                NUMBER(30)             NOT NULL,
  MPRO_MMOD_ID           NUMBER(30)             NOT NULL,
  MPRO_XCMS_ID           NUMBER(30)             NOT NULL,
  MPRO_PURPOSE           NUMBER(1)              NOT NULL,
  MPRO_INTERNALCATEGORY  NUMBER(2)              NOT NULL,
  CONSTRAINT MPRO_PK PRIMARY KEY (MPRO_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

COMMENT ON COLUMN MPRO.MPRO_ID IS 'unique id';

COMMENT ON COLUMN MPRO.MPRO_MMOD_ID IS 'link to mmod';

COMMENT ON COLUMN MPRO.MPRO_XCMS_ID IS 'profile id';

COMMENT ON COLUMN MPRO.MPRO_PURPOSE IS 'purpose of default profile. 1 = Reservation, 2 = Billing Instructions, 3 = Blocks, 4 = Financial Accounts';

COMMENT ON COLUMN MPRO.MPRO_INTERNALCATEGORY IS 'internal profile category, used to speed up profile handling for download';

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