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

 EXEC P_ALTERPK 'PK_HPDI_TASKARRANGE', 'T_HPDI_TASKARRANGE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_TASKARRANGE' AND KSQL_INDNAME = 'IDX_HPDI_TASKARRANGE') CREATE INDEX IDX_HPDI_TASKARRANGE ON T_HPDI_TASKARRANGE ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_TASKARRANGE' AND KSQL_INDNAME = 'IDX_HPDI_TASKARRANGE_FBOID') CREATE INDEX IDX_HPDI_TASKARRANGE_FBOID ON T_HPDI_TASKARRANGE ( FBOID );

 EXEC P_ALTERPK 'PK_HPDI_TASKARRANGE_L', 'T_HPDI_TASKARRANGE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_TASKARRANGE_L' AND KSQL_INDNAME = 'IDX_HPDI_TASKARRANGE_L') CREATE INDEX IDX_HPDI_TASKARRANGE_L ON T_HPDI_TASKARRANGE_L ( FID ,FLOCALEID );

 EXEC P_ALTERPK 'PK_HPDI_TASKARRANGEENT', 'T_HPDI_TASKARRANGEENT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_TASKARRANGEENT' AND KSQL_INDNAME = 'IDX_HPDI_TASKARRANGEENT') CREATE INDEX IDX_HPDI_TASKARRANGEENT ON T_HPDI_TASKARRANGEENT ( FID );


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