/**Begin C:\Users\rd_jin_gu\Documents\work\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_ANONYMOUSCONFIG', 'T_HRCS_ANONYMOUSCONFIG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PRIVACYOBJECT', 'T_HRCS_PRIVACYOBJECT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PRIVACYOBJENTRY', 'T_HRCS_PRIVACYOBJENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_APPANDENTITY') CREATE INDEX IDX_HRCS_APPANDENTITY ON T_HRCS_PRIVACYOBJENTRY ( FBIZAPPID ,FENTITY );


 EXEC P_ALTERPK 'PK_HRCS_ANONYMOUSCONFIG_L', 'T_HRCS_ANONYMOUSCONFIG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PRIVACYOBJECT_L', 'T_HRCS_PRIVACYOBJECT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PRIVACYOBJENTRY_L', 'T_HRCS_PRIVACYOBJENTRY_L', 'FPKID', '1';

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



/**End C:\Users\rd_jin_gu\Documents\work\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
