/**Begin D:\PDM_UPGRADE\PDM1\TM_constraint.sql **/
EXEC p_DropIdx 'IDX_TM_CASHFLOW', 'T_TM_CASHFLOW';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_CASHFLOW_BILLIDDIR') CREATE INDEX IDX_TM_CASHFLOW_BILLIDDIR ON T_TM_CASHFLOW ( FBILLID ,FDIRECTION );

EXEC p_DropIdx 'IDX_TM_CF_BAK', 'T_TM_CASHFLOW_BAK';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_CF_BAK_BILLIDDIR') CREATE INDEX IDX_TM_CF_BAK_BILLIDDIR ON T_TM_CASHFLOW_BAK ( FBILLID ,FDIRECTION );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_TRADE_ORGID') CREATE INDEX IDX_TM_TRADE_ORGID ON T_TM_TRADE ( FORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_BUSINESSBILL_ORGID') CREATE INDEX IDX_TM_BUSINESSBILL_ORGID ON T_TM_BUSINESSBILL ( FORGID );


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