/**Begin D:\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_CYCLETABLEREPORT_RT', 'T_BCM_CYCLETABLEREPORT_RT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_CYCLETABLE', 'T_BCM_CYCLETABLE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_CYCLETABLE') CREATE INDEX IDX_BCM_CYCLETABLE ON T_BCM_CYCLETABLE ( FMODELID ,FSCENARIOID );


 EXEC P_ALTERPK 'PK_T_BCM_CYCLETABLE_L', 'T_BCM_CYCLETABLE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_CYCLETABLE_L') CREATE INDEX IDX_BCM_CYCLETABLE_L ON T_BCM_CYCLETABLE_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BCM_TEMPDISCYCLETABLE', 'T_BCM_TEMPDISCYCLETABLE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_CYCLETABLEDISENTITY', 'T_BCM_CYCLETABLEDISENTITY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_CYCLETABLEREPORT', 'T_BCM_CYCLETABLEREPORT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_CTREPORT') CREATE INDEX IDX_BCM_CTREPORT ON T_BCM_CYCLETABLEREPORT ( FMODELID ,FFYEARID ,FPERIODID ,FSCENEID );



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