--THIS FILE IS NEEDED ONLY FOR THE ONLINE UPDATE OR WHEN UPGRADING FROM VERSION 8.7.4.20!!!

UPDATE MCNV SET MCNV_ZCNV_ID = (SELECT ZCNV_ID FROM ZCNV WHERE ZCNV_INTERFACEID = MCNV_MMOD_ID);

UPDATE MDEF SET MDEF_ZCNV_ID = (SELECT ZCNV_ID FROM ZCNV WHERE ZCNV_INTERFACEID = MDEF_MMOD_ID);

UPDATE MCOP SET MCOP_ZCNV_ID = (SELECT ZCNV_ID FROM ZCNV WHERE ZCNV_INTERFACEID = MCOP_MMOD_ID);

UPDATE MAVL SET MAVL_ZCNV_ID = (SELECT ZCNV_ID FROM ZCNV WHERE ZCNV_INTERFACEID = MAVL_MMOD_ID);

ALTER TABLE MCNV DROP COLUMN MCNV_MMOD_ID;

ALTER TABLE MDEF DROP COLUMN MDEF_MMOD_ID;

ALTER TABLE MCOP DROP COLUMN MCOP_MMOD_ID;

ALTER TABLE MAVL DROP COLUMN MAVL_MMOD_ID;

/*  MAVL  */
DROP INDEX MAVL_MMOD_ID;

/*  MCNV  */
DROP INDEX MCNV_MMOD_ID;

/*  MCOP  */
DROP INDEX MCOP_MMOD_ID;

/*  MDEF  */
DROP INDEX MDEF_MMOD_ID;

COMMIT;
