/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BCM_constraint.sql **/
EXEC p_DropIdx 'T_BCM_CHKNoteInfo_DIM', 'T_BCM_CHKNOTEINFO';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'T_BCM_CHKNOTEINFO_DIM') CREATE INDEX T_BCM_CHKNOTEINFO_DIM ON T_BCM_CHKNOTEINFO ( FMODEL ,FDIMSTR );

 EXEC P_ALTERPK 'PK_T_BCM_SCHEMEEXECUTEREC', 'T_BCM_SCHEMEEXECUTEREC', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_CHKATTDETAIL', 'T_BCM_CHKATTDETAIL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_CHKNOTEDETAIL', 'T_BCM_CHKNOTEDETAIL', 'FENTRYID', '1';

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



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BCM_constraint.sql **/
