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

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


 EXEC P_ALTERPK 'PK_T_BCM_INVRELATYPE_L', 'T_BCM_INVRELATYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_PAPERTEMPLATE_RLT', 'T_BCM_PAPERTEMPLATE_RLT', 'FPKID', '1';

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



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