/**Begin C:\PDM_UPGRADE\PDM1\PUR_constraint.sql **/



 EXEC P_ALTERPK 'PK_PUR_DATAHANDLETASK', 'T_PUR_DATAHANDLETASK', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_PUR_SCDATASET', 'T_PUR_SCDATASET', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_PUR_TASKCONFIG', 'T_PUR_TASKCONFIG', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_TASKCONFIG_FID_FSEQ') CREATE INDEX IDX_PUR_TASKCONFIG_FID_FSEQ ON T_PUR_TASKCONFIG ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PUR_SCDATARESULT', 'T_PUR_SCDATARESULT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_SCDATASET_FBILLID') CREATE INDEX IDX_PUR_SCDATASET_FBILLID ON T_PUR_SCDATARESULT ( FSOURCEBILLID ,FSOURCEBILLTYPE ,FCREATETIME );


 EXEC P_ALTERPK 'PK_PUR_HANDLERESULTENTRY', 'T_PUR_HANDLERESULTENTRY', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_HANDLERESULTENTRY_FID') CREATE INDEX IDX_PUR_HANDLERESULTENTRY_FID ON T_PUR_HANDLERESULTENTRY ( FID ,FSEQ );




 EXEC P_ALTERPK 'PK_PUR_DATAHANDLETASK_L', 'T_PUR_DATAHANDLETASK_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_PUR_SCDATASET_L', 'T_PUR_SCDATASET_L', 'FPKID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_SCDATASET_L_FID') CREATE INDEX IDX_PUR_SCDATASET_L_FID ON T_PUR_SCDATASET_L ( FID ,FLOCALEID );



/**End C:\PDM_UPGRADE\PDM1\PUR_constraint.sql **/
