EXEC P_ALTERPK 'PK_T_TM_REQLIMIT_ENTRY', 'T_TM_REQLIMIT_ENTRY', 'FENTRYID', '0';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TM_REQLIMIT_ENTRY_FID_C') CREATE UNIQUE INDEX IDX_T_TM_REQLIMIT_ENTRY_FID_C ON T_TM_REQLIMIT_ENTRY ( FID ,FCURRENCYID );

 EXEC p_AlterPK 'PK_TM_REQLIMIT_USE', 'T_TM_REQLIMIT_USE', 'fid', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_REQLIMIT_USE') CREATE UNIQUE INDEX IDX_TM_REQLIMIT_USE ON T_TM_REQLIMIT_USE ( FLIMITID ,FCURRENCYID );

 EXEC p_AlterPK 'PK_TM_REQLIMIT_USE_ENTRY', 'T_TM_REQLIMIT_USE_ENTRY', 'fentryid', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_REQLIMIT_USE_ENTRY_FK') CREATE UNIQUE INDEX IDX_TM_REQLIMIT_USE_ENTRY_FK ON T_TM_REQLIMIT_USE_ENTRY ( FID ,FBILLID );
