/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_EB_EXAMINE_DIMGROP', 'T_EB_EXAMINE_DIMGROP', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_EXAMINE_TEMP', 'T_EB_EXAMINE_TEMP', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BGMD_BIZRULETAXES', 'T_BGMD_BIZRULETAXES', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BGMD_PLANRULE', 'T_BGMD_PLANRULE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BGMD_PLANRULE_MODEL') CREATE INDEX IDX_BGMD_PLANRULE_MODEL ON T_BGMD_PLANRULE ( FMODELID );


 EXEC P_ALTERPK 'PK_T_BGMD_PLANRULEENTITY', 'T_BGMD_PLANRULEENTITY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_APPROVEBILLENTRY', 'T_EB_APPROVEBILLENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_APPROVEBILL', 'T_EB_APPROVEBILL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_APPROVEBILL_MODEL') CREATE INDEX IDX_EB_APPROVEBILL_MODEL ON T_EB_APPROVEBILL ( FMODELID );



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