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 protected function renameTable(string $from, string $to): \Generator
{ {
Logger::log("Renaming table {$from} to {$to}", Logger::WARNING); 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); $lenK = \strlen($from);
while (yield $request->advance()) { while (yield $request->advance()) {