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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_TRANSFERMODEL_BNO') CREATE INDEX IDX_BCM_TRANSFERMODEL_BNO ON T_BCM_TRANSFERMODEL_LOG ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_TRANSFERMODEL_CRE') CREATE INDEX IDX_BCM_TRANSFERMODEL_CRE ON T_BCM_TRANSFERMODEL_LOG ( FCREATETIME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_TRANSFERMODEL_SM') CREATE INDEX IDX_BCM_TRANSFERMODEL_SM ON T_BCM_TRANSFERMODEL_LOG ( FSOURCEMODEL );


 EXEC P_ALTERPK 'PK_T_BCM_USERPREFERSET', 'T_BCM_USERPREFERSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_USERPREFERSET_USER') CREATE INDEX IDX_BCM_USERPREFERSET_USER ON T_BCM_USERPREFERSET ( FUSER );


 EXEC P_ALTERPK 'PK_T_BCM_TRANSFERMODEL_DETAI', 'T_BCM_TRANSFERMODEL_DETAI', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_TRANMOD_DETAI') CREATE INDEX IDX_BCM_TRANMOD_DETAI ON T_BCM_TRANSFERMODEL_DETAI ( FACTLOGNUMBER ,FENTITYNAME ,FENTRYNAME ,FORIGINPK );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_TRANMOD_CRE') CREATE INDEX IDX_BCM_TRANMOD_CRE ON T_BCM_TRANSFERMODEL_DETAI ( FCREATETIME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_TRANMOD_ORI') CREATE INDEX IDX_BCM_TRANMOD_ORI ON T_BCM_TRANSFERMODEL_DETAI ( FORIGINPK );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_TRANMOD_ENW') CREATE INDEX IDX_BCM_TRANMOD_ENW ON T_BCM_TRANSFERMODEL_DETAI ( FNEWPK );



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