/**Begin D:\work\kuaijishijian\pdm\PDM_UPGRADE_1.4\PDM_UPGRADE\PDM1\AI_constraint.sql **/
 EXEC P_ALTERPK 'PK_FAH_VALMAP_TYPE_GROUP_L', 'T_FAH_VALMAP_TYPE_GROUP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_FAH_VALMAP_TYPE_GROUP', 'T_FAH_VALMAP_TYPE_GROUP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_VALMAP_TYPE_GROUP' AND KSQL_INDNAME = 'IDX_FAH_VALMAP_TYPE_GROUP') CREATE INDEX IDX_FAH_VALMAP_TYPE_GROUP ON T_FAH_VALMAP_TYPE_GROUP ( FNUMBER );


 EXEC P_ALTERPK 'PK_FAH_VALMAP_TYPE_ORG', 'T_FAH_VALMAP_TYPE_ORG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_VALMAP_TYPE_ORG' AND KSQL_INDNAME = 'IDX_FAH_VALMAP_TYPE_ORG') CREATE INDEX IDX_FAH_VALMAP_TYPE_ORG ON T_FAH_VALMAP_TYPE_ORG ( FMAPTYPEID );


 EXEC P_ALTERPK 'PK_FAH_FLEX_MAPVAL_TMP', 'T_FAH_FLEX_MAPVAL_TMP', 'FTMPID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_FLEX_MAPVAL_TMP' AND KSQL_INDNAME = 'IDX_FAH_FLEX_MAPVAL_TTH') CREATE INDEX IDX_FAH_FLEX_MAPVAL_TTH ON T_FAH_FLEX_MAPVAL_TMP ( FMAPTYPEID ,FHASHCODE );


 EXEC P_ALTERPK 'PK_FAH_FLEX_MAPVAL_HIS', 'T_FAH_FLEX_MAPVAL_HIS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_FLEX_MAPVAL_HIS' AND KSQL_INDNAME = 'IDX_FAH_FLEX_MAPVAL_HTH') CREATE INDEX IDX_FAH_FLEX_MAPVAL_HTH ON T_FAH_FLEX_MAPVAL_HIS ( FMAPTYPEID ,FHASHCODE );


 EXEC P_ALTERPK 'PK_FAH_BGTASK_LOG', 'T_FAH_BGTASK_LOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_BGTASK_LOG' AND KSQL_INDNAME = 'IDX_FAH_BGTASK_LOG') CREATE INDEX IDX_FAH_BGTASK_LOG ON T_FAH_BGTASK_LOG ( FTASKTYPE );


 EXEC P_ALTERPK 'PK_FAH_BGTASK_LOG_DETAIL', 'T_FAH_BGTASK_LOG_DETAIL', 'FENTRYID', '1';

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



/**End D:\work\kuaijishijian\pdm\PDM_UPGRADE_1.4\PDM_UPGRADE\PDM1\AI_constraint.sql **/
