/**Begin D:\PDM_UPGRADE\PDM1\MSPLAN_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MSPLAN_BATCH_EDIT', 'T_MSPLAN_BATCH_EDIT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_BATCH_EDIT') CREATE INDEX IDX_MSPLAN_BATCH_EDIT ON T_MSPLAN_BATCH_EDIT ( FSOURCE );


 EXEC P_ALTERPK 'PK_T_MSPLAN_BATCH_EDIT_L', 'T_MSPLAN_BATCH_EDIT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_MSPLAN_PLANUPDATELOG', 'T_MSPLAN_PLANUPDATELOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_PLANUPDATELOG') CREATE INDEX IDX_MSPLAN_PLANUPDATELOG ON T_MSPLAN_PLANUPDATELOG ( FUSERNAME ,FPLANORDERBILLNO );



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