/**Begin D:\PDM_UPGRADE\PDM1\MRP_constraint.sql **/


 EXEC P_ALTERPK 'PK_T_MRP_CHANGE_DETAIL', 'T_MRP_CHANGE_DETAIL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CHANGE_DETAIL_RED') CREATE INDEX IDX_MRP_CHANGE_DETAIL_RED ON T_MRP_CHANGE_DETAIL ( FRECORD_ID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CHANGE_DETAIL_M') CREATE INDEX IDX_MRP_CHANGE_DETAIL_M ON T_MRP_CHANGE_DETAIL ( F_S_MATERIEL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CHANGE_DETAIL_BID') CREATE INDEX IDX_MRP_CHANGE_DETAIL_BID ON T_MRP_CHANGE_DETAIL ( F_BILL_ID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CHANGE_DETAIL_SID') CREATE INDEX IDX_MRP_CHANGE_DETAIL_SID ON T_MRP_CHANGE_DETAIL ( F_BAL_ID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CHANGE_DETAIL_WEAK') CREATE INDEX IDX_MRP_CHANGE_DETAIL_WEAK ON T_MRP_CHANGE_DETAIL ( FISWEAK );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CHANGE_DETAIL_TYPE') CREATE INDEX IDX_MRP_CHANGE_DETAIL_TYPE ON T_MRP_CHANGE_DETAIL ( FTYPE );



/**End D:\PDM_UPGRADE\PDM1\MRP_constraint.sql **/
