Upgrade from 5.6.2 to 5.8.0 - Table 'dbuser.dbuser_log_bot_request' doesn't exist - in plugin BotTracking

I are using Matomo On-Premise with IIS locally. I upgarded the Matomo from 5.6.2 to 5.8.0 by using the update link in the “New Update” notification. The installation is completed normally as usual.

Matomo version: 5.8.0
MySQL version: 8.4.7
PHP version: 8.4.19

However, when the archive is running, it reports the following errors:

INFO [2026-03-28 15:05:42] 8184 SUMMARY OF ERRORS
INFO [2026-03-28 15:05:42] 8184 Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2026-03-28&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘dbuser.dbuser_log_bot_request’ doesn’t exist - in plugin BotTracking.”}’
INFO [2026-03-28 15:05:42] 8184 Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2026-03-23&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘dbuser.dbuser_log_bot_request’ doesn’t exist - in plugin BotTracking.”}’
INFO [2026-03-28 15:05:42] 8184 Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2026-03-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘dbuser.dbuser_log_bot_request’ doesn’t exist - in plugin BotTracking.”}’
INFO [2026-03-28 15:05:42] 8184 Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2026-01-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘dbuser.dbuser_log_bot_request’ doesn’t exist - in plugin BotTracking.”}’
ERROR [2026-03-28 15:05:42] 8184 4 total errors during this script execution, please investigate and try and fix these errors.
ERROR [2026-03-28 15:05:42] 8184 Uncaught exception: D:\dbuser\core\CronArchive.php(740): 4 total errors during this script execution, please investigate and try and fix these errors. [Query: , CLI mode: 1]

I found there was another post “Table ‘dbuser.mt8k_log_bot_request’ doesn’t exist - in plugin BotTracking“ which mentioned a similar issue, but I am not using Softaculous Apps Installer.

I used the given temporary solution which mentioned in the post, and the archiving process runs correctly, but the problem reappears while the BotTracking plugin is re-enabled, and the archiving processes is fail again.

I solved the problem by creatiing the missing table in database. There is no more error found when core:archive is running. The table SQL sdcript could be found in BotRequestsDao.php

XXXXX_ is the tables_prefix in config.ini.php

CREATE TABLE `XXXXX_log_bot_request` (

`idrequest` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,

`idsite` INT UNSIGNED NOT NULL,

`server_time` DATETIME NOT NULL,

`created_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,

`idaction_url` INT UNSIGNED NULL,

`bot_name` VARCHAR(100) NOT NULL,

`bot_type` VARCHAR(50) NOT NULL,

`http_status_code` SMALLINT UNSIGNED NULL,

`response_size_bytes` INT UNSIGNED NULL,

`response_time_ms` INT UNSIGNED NULL,

`source` VARCHAR(50) NULL,

PRIMARY KEY (`idrequest`),

KEY `index_idsite_server_time` (`idsite`, `server_time`)

)