/**Begin D:\tools\PDM_UPGRADE\PDM1\HIES_constraint.sql **/
 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLCONF', 'T_HIES_ENTRYTPLCONF', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLCONF_L', 'T_HIES_ENTRYTPLCONF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLFIELDCONF', 'T_HIES_ENTRYTPLFIELDCONF', 'FENTRYID', '1';

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

 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLFIELDCONF_L', 'T_HIES_ENTRYTPLFIELDCONF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLORG', 'T_HIES_ENTRYTPLORG', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLROLE', 'T_HIES_ENTRYTPLROLE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLROLEORG', 'T_HIES_ENTRYTPLROLEORG', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HIES_ENTRYTPLUSER', 'T_HIES_ENTRYTPLUSER', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_HIES_ENTRYCONDFIELDCONF', 'T_HIES_ENTRYCONDFIELDCONF', 'FENTRYID', '1';

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

/**End D:\tools\PDM_UPGRADE\PDM1\HIES_constraint.sql **/
