/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_constraint.sql **/
 EXEC P_ALTERPK 'PK_HPDI_TASKCENTER_L', 'T_HPDI_TASKCENTER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_TASKCENTER', 'T_HPDI_TASKCENTER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_TASKCENTER') CREATE INDEX IDX_HPDI_TASKCENTER ON T_HPDI_TASKCENTER ( FORGMSGRECVCENTERID );


 EXEC P_ALTERPK 'PK_HPDI_BUVALUECONFIG', 'T_HPDI_BUVALUECONFIG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_BUVALUECONFIG_L', 'T_HPDI_BUVALUECONFIG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_BUVALUECONFIGENT', 'T_HPDI_BUVALUECONFIGENT', 'FENTRYID', '1';


 EXEC P_ALTERPK 'PK_HPDI_TASKRULE', 'T_HPDI_TASKRULE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_TASKRULE_L', 'T_HPDI_TASKRULE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_TASKRULEENT', 'T_HPDI_TASKRULEENT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_TASKRULEENT') CREATE INDEX IDX_HPDI_TASKRULEENT ON T_HPDI_TASKRULEENT ( FPAYROLLACTGID );



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