/**Begin D:\PDM_UPGRADE\PDM1\TM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_TM_BIZRECORD', 'T_TM_BIZRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_BIZRECORD_TRADEBILLID') CREATE INDEX IDX_TM_BIZRECORD_TRADEBILLID ON T_TM_BIZRECORD ( FTRADEBILLID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_BIZRECORD_PID') CREATE INDEX IDX_TM_BIZRECORD_PID ON T_TM_BIZRECORD ( FPID );


 EXEC P_ALTERPK 'PK_T_TM_BIZRECORD_L', 'T_TM_BIZRECORD_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_BIZRECORD_L') CREATE INDEX IDX_TM_BIZRECORD_L ON T_TM_BIZRECORD_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_TM_BIZRECORD_ENTRY', 'T_TM_BIZRECORD_ENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_BIZRECORD_ENTRY') CREATE INDEX IDX_TM_BIZRECORD_ENTRY ON T_TM_BIZRECORD_ENTRY ( FID );



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