/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_IM_COSTCOLSMAPENTRY', 'T_IM_COSTCOLSMAPENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_IM_COSTPRICECONF', 'T_IM_COSTPRICECONF', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_COSTPRICECONF_NUM') CREATE INDEX IDX_IM_COSTPRICECONF_NUM ON T_IM_COSTPRICECONF ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_IM_COSTPRICECONF_L', 'T_IM_COSTPRICECONF_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_COSTPRICECONF_L_ID') CREATE INDEX IDX_IM_COSTPRICECONF_L_ID ON T_IM_COSTPRICECONF_L ( FID ,FLOCALEID );



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