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

 EXEC P_ALTERPK 'PK_T_BCM_DATAANALYTICSSCHEM', 'T_BCM_DATAANALYTICSSCHEM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_DATAANALYTICSSCHEM' AND KSQL_INDNAME = 'IDX_BCM_DATAANALYTICSSCHEM') CREATE INDEX IDX_BCM_DATAANALYTICSSCHEM ON T_BCM_DATAANALYTICSSCHEM ( FMODELID ,FNUMBER );


 EXEC P_ALTERPK 'PK_T_BCM_DATAANALYTICSSCHEM_L', 'T_BCM_DATAANALYTICSSCHEM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_DATAANALYTICSDIM', 'T_BCM_DATAANALYTICSDIM', 'FENTRYID', '1';

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



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