/**Begin D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_FUNCTION', 'T_HRCS_FUNCTION', 'FID', '1';

 EXEC P_ALTERPK 'PK_HRCS_FUNCTION_L', 'T_HRCS_FUNCTION_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_FUNCTIONPARAMS', 'T_HRCS_FUNCTIONPARAMS', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_FUNCTIONPARAMS_L', 'T_HRCS_FUNCTIONPARAMS_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FUNCTIONPARAMS_L') CREATE INDEX IDX_HRCS_FUNCTIONPARAMS_L ON T_HRCS_FUNCTIONPARAMS_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRCS_FUNCTIONIMPORT', 'T_HRCS_FUNCTIONIMPORT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_FUNCTIONIMPORT_L', 'T_HRCS_FUNCTIONIMPORT_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FUNCTIONIMPORT_L') CREATE INDEX IDX_HRCS_FUNCTIONIMPORT_L ON T_HRCS_FUNCTIONIMPORT_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRCS_FUNCTIONTYPE', 'T_HRCS_FUNCTIONTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_FUNCTIONTYPE_L', 'T_HRCS_FUNCTIONTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_FUNCTIONTYPEHRBF', 'T_HRCS_FUNCTIONTYPEHRBF', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FUNCTIONTYPEHRBF') CREATE INDEX IDX_HRCS_FUNCTIONTYPEHRBF ON T_HRCS_FUNCTIONTYPEHRBF ( FID ,FBASEDATAID );


EXEC p_DropIdx 'IDX_HRCS_FUNCTION', 'T_HRCS_FUNCTION';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FUNCTION_FNUMBER') CREATE INDEX IDX_HRCS_FUNCTION_FNUMBER ON T_HRCS_FUNCTION ( FNUMBER );

EXEC p_DropIdx 'IDX_HRCS_FUNCTION_L', 'T_HRCS_FUNCTION_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FUNCTION_L') CREATE INDEX IDX_HRCS_FUNCTION_L ON T_HRCS_FUNCTION_L ( FLOCALEID ,FID );

EXEC p_DropIdx 'IDX_HRCS_FUNCTIONPARAMS_L', 'T_HRCS_FUNCTIONPARAMS_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FUNCTIONPARAMS_L') CREATE INDEX IDX_HRCS_FUNCTIONPARAMS_L ON T_HRCS_FUNCTIONPARAMS_L ( FLOCALEID ,FENTRYID );

EXEC p_DropIdx 'IDX_HRCS_FUNCTIONIMPORT_L', 'T_HRCS_FUNCTIONIMPORT_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FUNCTIONIMPORT_L') CREATE INDEX IDX_HRCS_FUNCTIONIMPORT_L ON T_HRCS_FUNCTIONIMPORT_L ( FLOCALEID ,FENTRYID );


/**End D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
