/**Begin D:\tool\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_RIM_AUTO_DEDUCTION_TASK', 'T_RIM_AUTO_DEDUCTION_TASK', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_AUTO_DE_TASK_MASTERID') CREATE INDEX IDX_RIM_AUTO_DE_TASK_MASTERID ON T_RIM_AUTO_DEDUCTION_TASK ( FMASTERID );


 EXEC P_ALTERPK 'PK_T_RIM_AUTO_DEDUCT_BILLS', 'T_RIM_AUTO_DEDUCT_BILLS', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_RIM_AUTO_DEDUCTION_TASK_L', 'T_RIM_AUTO_DEDUCTION_TASK_L', 'FPKID', '1';

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



/**End D:\tool\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
