1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 07:14:39 +01:00

Fix table renaming

This commit is contained in:
Daniil Gentili 2020-09-12 20:14:58 +02:00
parent e85fef23a5
commit 22dd19a9de
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -27,7 +27,10 @@ class RedisArray extends SqlArray
protected function renameTable(string $from, string $to): \Generator
{
Logger::log("Renaming table {$from} to {$to}", Logger::WARNING);
$request = $this->db->scan($this->itKey());
$from = "va:$from";
$to = "va:$to";
$request = $this->db->scan($from.'*');
$lenK = \strlen($from);
while (yield $request->advance()) {