/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_ANALYSISHELPER', 'T_BCM_ANALYSISHELPER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_ANALYSISHELPER' AND KSQL_INDNAME = 'IDX_BCM_ANALYSISHELPER') CREATE INDEX IDX_BCM_ANALYSISHELPER ON T_BCM_ANALYSISHELPER ( FMODELID );


 EXEC P_ALTERPK 'PK_T_BCM_ANALYSISHELPER_L', 'T_BCM_ANALYSISHELPER_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_ANALYSISHELPER_L' AND KSQL_INDNAME = 'IDX_BCM_ANALYSISHELPER_L_FID') CREATE INDEX IDX_BCM_ANALYSISHELPER_L_FID ON T_BCM_ANALYSISHELPER_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BCM_ANAYSISDIMRANGE', 'T_BCM_ANAYSISDIMRANGE', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_ANAYSISDIMRANGE' AND KSQL_INDNAME = 'IDX_BCM_ANAYSISDIMRANGE_FID') CREATE INDEX IDX_BCM_ANAYSISDIMRANGE_FID ON T_BCM_ANAYSISDIMRANGE ( FID );


 EXEC P_ALTERPK 'PK_T_BCM_ANAYSISCATALOG', 'T_BCM_ANAYSISCATALOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_ANAYSISCATALOG' AND KSQL_INDNAME = 'IDX_BCM_ANAYSISCATALOG') CREATE INDEX IDX_BCM_ANAYSISCATALOG ON T_BCM_ANAYSISCATALOG ( FMODELID );


 EXEC P_ALTERPK 'PK_T_BCM_ANAYSISCATALOG_L', 'T_BCM_ANAYSISCATALOG_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_ANAYSISCATALOG_L' AND KSQL_INDNAME = 'IDX_BCM_ANAYSISCATALOG_L') CREATE INDEX IDX_BCM_ANAYSISCATALOG_L ON T_BCM_ANAYSISCATALOG_L ( FID ,FLOCALEID );



/**End D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
