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

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


 EXEC P_ALTERPK 'PK_T_BCM_INVSHARECASE_L', 'T_BCM_INVSHARECASE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_INVSHARECASESET', 'T_BCM_INVSHARECASESET', 'FID', '1';

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



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