/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_constraint.sql **/

 EXEC P_ALTERPK 'PK_IM_MDC_REPLACELOG', 'T_IM_MDC_REPLACELOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_REPLACELOG_FSRCBILLID') CREATE INDEX IDX_MDC_REPLACELOG_FSRCBILLID ON T_IM_MDC_REPLACELOG ( FSRCBILLID );


 EXEC P_ALTERPK 'PK_IM_MDC_REPLOGENTRY', 'T_IM_MDC_REPLOGENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_REPLOGENTRY_FID') CREATE INDEX IDX_MDC_REPLOGENTRY_FID ON T_IM_MDC_REPLOGENTRY ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_REPLOGENTRY_FMASTERID') CREATE INDEX IDX_MDC_REPLOGENTRY_FMASTERID ON T_IM_MDC_REPLOGENTRY ( FMATERIELMASTERID );


 EXEC P_ALTERPK 'PK_IM_MDC_REPLOGENTRYCLD', 'T_IM_MDC_REPLOGENTRYCLD', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_REPLOGENTRYC_FENTRYID') CREATE INDEX IDX_MDC_REPLOGENTRYC_FENTRYID ON T_IM_MDC_REPLOGENTRYCLD ( FENTRYID );





/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_constraint.sql **/
