/**Begin D:\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_INTELSCHEDULE', 'T_BCM_INTELSCHEDULE', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_INTELSCH_MODNUM') CREATE INDEX IDX_BCM_INTELSCH_MODNUM ON T_BCM_INTELSCHEDULE ( FNUMBER ,FMODELID );


 EXEC P_ALTERPK 'PK_T_BCM_INTELSCHEDULE_L', 'T_BCM_INTELSCHEDULE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_INTELSCHEDULEENTRY_L', 'T_BCM_INTELSCHEDULEENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_INTELSCENTRY_L') CREATE INDEX IDX_BCM_INTELSCENTRY_L ON T_BCM_INTELSCHEDULEENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BCM_INTELSCHEDULEENTRY', 'T_BCM_INTELSCHEDULEENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_INTELSCHEDULELOG', 'T_BCM_INTELSCHEDULELOG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_DSPPARAMENTITY', 'T_BCM_DSPPARAMENTITY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_DSPISSCHEME', 'T_BCM_DSPISSCHEME', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_DSPPARAMENTRY', 'T_BCM_DSPPARAMENTRY', 'FPKID', '1';

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



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