/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\LOG_constraint.sql **/
 EXEC P_ALTERPK 'PK_LOG_ASYNCOP_L', 'T_LOG_ASYNCOP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_LOG_ASYNCOP', 'T_LOG_ASYNCOP', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_ASYNCOP_ENTITY') CREATE INDEX IDX_LOG_ASYNCOP_ENTITY ON T_LOG_ASYNCOP ( FENTITY );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_ASYNCOP_OP') CREATE INDEX IDX_LOG_ASYNCOP_OP ON T_LOG_ASYNCOP ( FOPERATOR );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_ASYNCOP_RULE') CREATE INDEX IDX_LOG_ASYNCOP_RULE ON T_LOG_ASYNCOP ( FOPRULEKEY );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_ASYNCOP_TIME') CREATE INDEX IDX_LOG_ASYNCOP_TIME ON T_LOG_ASYNCOP ( FEXETIME );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\LOG_constraint.sql **/
