/**Begin D:\04tools\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_SIGNFILE', 'T_HRCS_SIGNFILE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_SIGNFILEBILLNO') CREATE INDEX IDX_HRCS_SIGNFILEBILLNO ON T_HRCS_SIGNFILE ( FBILLNO );


 EXEC P_ALTERPK 'PK_HRCS_SIGNFLOW', 'T_HRCS_SIGNFLOW', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_SIGNFLOWBILLNO') CREATE INDEX IDX_HRCS_SIGNFLOWBILLNO ON T_HRCS_SIGNFLOW ( FBILLNO );


 EXEC P_ALTERPK 'PK_HRCS_SIGNFILEEXT', 'T_HRCS_SIGNFILEEXT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_SIGNFLOWEXT', 'T_HRCS_SIGNFLOWEXT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_SIGNFLOWPSN', 'T_HRCS_SIGNFLOWPSN', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_SIGNFLOWORG', 'T_HRCS_SIGNFLOWORG', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_REALNAMEAUTHMODE', 'T_HRCS_REALNAMEAUTHMODE', 'FID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_REALNAMEAUTHMODE_L', 'T_HRCS_REALNAMEAUTHMODE_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ESIGNSPMGR', 'T_HRCS_ESIGNSPMGR', 'FID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNSPMGR_L', 'T_HRCS_ESIGNSPMGR_L', 'FPKID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNSPMGRENTRY', 'T_HRCS_ESIGNSPMGRENTRY', 'FENTRYID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNSPMGRENTRY_L', 'T_HRCS_ESIGNSPMGRENTRY_L', 'FPKID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNSPMGRENTRY2', 'T_HRCS_ESIGNSPMGRENTRY2', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ESIGNAPPCFG', 'T_HRCS_ESIGNAPPCFG', 'FID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNAPPCFG_L', 'T_HRCS_ESIGNAPPCFG_L', 'FPKID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNAPPCFGENTRY', 'T_HRCS_ESIGNAPPCFGENTRY', 'FENTRYID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNAPPCFGENTRY_L', 'T_HRCS_ESIGNAPPCFGENTRY_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ESIGNPARMCFG', 'T_HRCS_ESIGNPARMCFG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_ESIGNPARMCFG_FCREATORID') CREATE INDEX IDX_HRCS_ESIGNPARMCFG_FCREATORID ON T_HRCS_ESIGNPARMCFG ( FCREATORID );

EXEC P_ALTERPK 'PK_HRCS_ESIGNPARMCFGAM', 'T_HRCS_ESIGNPARMCFGAM', 'FPKID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNPARMCFGENTRY', 'T_HRCS_ESIGNPARMCFGENTRY', 'FENTRYID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNSEALTYPE', 'T_HRCS_ESIGNSEALTYPE', 'FID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNSEALTYPE_L', 'T_HRCS_ESIGNSEALTYPE_L', 'FPKID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNCOSEAL', 'T_HRCS_ESIGNCOSEAL', 'FID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNCOSEAL_L', 'T_HRCS_ESIGNCOSEAL_L', 'FPKID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNCALLBACKFLOW', 'T_HRCS_ESIGNCALLBACKFLOW', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_ESIGNCALLBACKFLOWBILLNO') CREATE INDEX IDX_HRCS_ESIGNCALLBACKFLOWBILLNO ON T_HRCS_ESIGNCALLBACKFLOW ( FBILLNO );

EXEC P_ALTERPK 'PK_HRCS_ESIGNSEALAUTH', 'T_HRCS_ESIGNSEALAUTH', 'FID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ESIGNSEALAUTH_L', 'T_HRCS_ESIGNSEALAUTH_L', 'FPKID', '1';

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

/**End D:\04tools\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
