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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_INIRULE_SCHID') CREATE INDEX IDX_BCM_INIRULE_SCHID ON T_BCM_ISINIRULE ( FSCHEMEID );


 EXEC P_ALTERPK 'PK_T_BCM_BDMAPPING', 'T_BCM_BDMAPPING', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_BDMAP_N') CREATE INDEX IDX_BCM_BDMAP_N ON T_BCM_BDMAPPING ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_BCM_BDMAPPING_L', 'T_BCM_BDMAPPING_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_BDMAPPINGENTRY', 'T_BCM_BDMAPPINGENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_BDCONFIG_L', 'T_BCM_BDCONFIG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_BDCONFIG', 'T_BCM_BDCONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_BDCONFIG') CREATE INDEX IDX_BCM_BDCONFIG ON T_BCM_BDCONFIG ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_BCM_BDIMPORT', 'T_BCM_BDIMPORT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_BDIMPORT') CREATE INDEX IDX_BCM_BDIMPORT ON T_BCM_BDIMPORT ( FNUMBER );



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