External webdav files:sync error

Nextcloud version (eg, 20.0.5): 27.1.1
From Docker Hub latest

The issue you are facing:

docker exec --user www-data app-nextcloud-1 php occ files:scan -p /snickser@gmail.com/files/Mail.ru

Starting scan for user 1 out of 1 (snickser@gmail.com)
Exception during scan: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘storage_mtime’ cannot be null
#0 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1814): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1749): Doctrine\DBAL\Connection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#2 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1163): Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), ‘UPDATE oc_file...', Array, Array) #3 /var/www/html/lib/private/DB/Connection.php(295): Doctrine\DBAL\Connection->executeStatement('UPDATE oc_file…’, Array, Array)
#4 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(354): OC\DB\Connection->executeStatement(‘UPDATE `oc_file…’, Array, Array)
#5 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/html/lib/private/Files/Cache/Cache.php(386): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/html/lib/private/Files/Cache/Scanner.php(297): OC\Files\Cache\Cache->update(139077, Array)
#8 /var/www/html/lib/private/Files/Cache/Scanner.php(233): OC\Files\Cache\Scanner->addToCache(‘’, Array, 139077)
#9 /var/www/html/lib/private/Files/Cache/Scanner.php(345): OC\Files\Cache\Scanner->scanFile(‘’, 3, -1, Object(OC\Files\Cache\CacheEntry), true)
#10 /var/www/html/lib/private/Files/Utils/Scanner.php(269): OC\Files\Cache\Scanner->scan(‘’, true, 3)
#11 /var/www/html/apps/files/lib/Command/Scan.php(164): OC\Files\Utils\Scanner->scan(‘/snickser@gmail…’, true, NULL)
#12 /var/www/html/apps/files/lib/Command/Scan.php(219): OCA\Files\Command\Scan->scanFiles(‘snickser@gmail…’, ‘/snickser@gmail…’, false, Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#13 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/console.php(100): OC\Console\Application->run()
#20 /var/www/html/occ(11): require_once(‘/var/www/html/c…’)
#21 {main}

±--------±------±-------±-------------+
| Folders | Files | Errors | Elapsed time |
±--------±------±-------±-------------+
| 0 | 0 | 1 | 00:00:00 |
±--------±------±-------±-------------+

Is this the first time you’ve seen this error? (Y/N): Y

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YHCSbbrsqUT6wjgCMz2P","level":0,"time":"2023-10-01T11:28:11+03:00","remoteAddr":"","user":"--","app":"dav","method":"","url":"--","message":"sending dav PROPFIND request to external storage: http://localhosthttps://webdav.cloud.mail.ru/nextcloud/","userAgent":"--","version":"27.1.1.0","data":{"app":"dav"}}
{"reqId":"YHCSbbrsqUT6wjgCMz2P","level":0,"time":"2023-10-01T11:28:11+03:00","remoteAddr":"","user":"--","app":"dav","method":"","url":"--","message":"dav PROPFIND request to external storage: http://localhosthttps://webdav.cloud.mail.ru/nextcloud/ took 226.7ms","userAgent":"--","version":"27.1.1.0","data":{"app":"dav"}}
{"reqId":"YHCSbbrsqUT6wjgCMz2P","level":0,"time":"2023-10-01T11:28:11+03:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"DB QueryBuilder: 'SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` WHERE (`storage` = :dcValue1) AND (`path_hash` = :dcValue2)' with parameters: dcValue1 => '32', dcValue2 => 'd41d8cd98f00b204e9800998ecf8427e'","userAgent":"--","version":"27.1.1.0","data":{"app":"core"}}
{"reqId":"YHCSbbrsqUT6wjgCMz2P","level":0,"time":"2023-10-01T11:28:11+03:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"DB QueryBuilder: 'UPDATE `*PREFIX*filecache` SET `storage_mtime` = :dcValue7, `size` = :dcValue8, `etag` = :dcValue9, `checksum` = :dcValue10, `parent` = :dcValue11 WHERE (`fileid` = :dcValue1) AND (((`storage_mtime` <> :dcValue2) OR (`storage_mtime` IS NULL)) OR ((`size` <> :dcValue3) OR (`size` IS NULL)) OR ((`etag` <> :dcValue4) OR (`etag` IS NULL)) OR ((`checksum` <> :dcValue5) OR (`checksum` IS NULL)) OR ((`parent` <> :dcValue6) OR (`parent` IS NULL)))' with parameters: dcValue1 => '139077', dcValue2 => '', dcValue3 => '-1', dcValue4 => '65192d9b56049', dcValue5 => '', dcValue6 => '-1', dcValue7 => '', dcValue8 => '-1', dcValue9 => '65192d9b56049', dcValue10 => '', dcValue11 => '-1'","userAgent":"--","version":"27.1.1.0","data":{"app":"core"}}