/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_ISFORMULASETTING', 'T_BCM_ISFORMULASETTING', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ISFORMULASETTING') CREATE INDEX IDX_BCM_ISFORMULASETTING ON T_BCM_ISFORMULASETTING ( FSCHEME );


 EXEC P_ALTERPK 'PK_T_BCM_ANALYSOLUSAVELOG', 'T_BCM_ANALYSOLUSAVELOG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_DIMENSIONMAPNEW', 'T_BCM_DIMENSIONMAPNEW', 'FID', '1';

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


EXEC p_DropIdx 'IDX_BCM_INVRELADEFINE_L_FID', 'T_BCM_INVRELATIONDEFINE_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_INVRELADEFINE_L_FID') CREATE INDEX IDX_BCM_INVRELADEFINE_L_FID ON T_BCM_INVRELATIONDEFINE_L ( FENTRYID );


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