/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TSRBD_constraint.sql **/
 EXEC P_ALTERPK 'PK_TSRBD_ENTRYOPERATE', 'T_TSRBD_ENTRYOPERATE', 'FENTRYID', '1';

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

 EXEC P_ALTERPK 'PK_TSRBD_INTVERQUALIFY', 'T_TSRBD_INTVERQUALIFY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TSRBD_INTVERQUALIFY_L', 'T_TSRBD_INTVERQUALIFY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TSRBD_INTVERVIEW', 'T_TSRBD_INTVERVIEW', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TSRBD_INTVPERSONID') CREATE INDEX IDX_TSRBD_INTVPERSONID ON T_TSRBD_INTVERVIEW ( FPERSONID );


 EXEC P_ALTERPK 'PK_TSRBD_INTVERSCENE', 'T_TSRBD_INTVERSCENE', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TSRBD_INTVERSCENE') CREATE INDEX IDX_TSRBD_INTVERSCENE ON T_TSRBD_INTVERSCENE ( FENTRYID );

 EXEC P_ALTERPK 'PK_TSRBD_INTVERVIEW_L', 'T_TSRBD_INTVERVIEW_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_TSRBD_RULEOPMANAGE', 'T_TSRBD_RULEOPMANAGE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TSRBD_RULEOPMANAGE') CREATE INDEX IDX_TSRBD_RULEOPMANAGE ON T_TSRBD_RULEOPMANAGE ( FNUMBER ,FNAME );


 EXEC P_ALTERPK 'PK_TSRBD_RULEOPMANAGE_L', 'T_TSRBD_RULEOPMANAGE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TSRBD_RULEPARAMENTRY', 'T_TSRBD_RULEPARAMENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TSRBD_RULEPARAMENTRY_L', 'T_TSRBD_RULEPARAMENTRY_L', 'FPKID', '1';

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

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