/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\LOG_constraint.sql **/
 EXEC P_ALTERPK 'PK_LOG_DBCACHE', 'T_LOG_DBCACHE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_DBCACHE_REGION') CREATE INDEX IDX_LOG_DBCACHE_REGION ON T_LOG_DBCACHE ( FREGION );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_DBCACHE_TYPE') CREATE INDEX IDX_LOG_DBCACHE_TYPE ON T_LOG_DBCACHE ( FTYPE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_DBCACHE_OVERTIME') CREATE INDEX IDX_LOG_DBCACHE_OVERTIME ON T_LOG_DBCACHE ( FOVERTIME );


 EXEC P_ALTERPK 'PK_LOG_DBCACHEENTRY', 'T_LOG_DBCACHEENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_DBCACHEENTRY_OT') CREATE INDEX IDX_LOG_DBCACHEENTRY_OT ON T_LOG_DBCACHEENTRY ( FOVERTIME );



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