1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 04:35:12 +01:00
This commit is contained in:
Daniil Gentili 2023-08-14 16:42:49 +02:00
parent f4a268ffd6
commit 3b981c1fe1
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 13 additions and 2 deletions

View File

@ -171,6 +171,7 @@ abstract class DriverArray implements DbArray, IteratorAggregate
Logger::log("Loading data to table {$newName}: $counter/$total", Logger::WARNING);
}
}
if ($promises) await($promises);
if (self::getMigrationName($new, false) !== self::getMigrationName($old, false)) {
Logger::log("Dropping data from table {$oldName}", Logger::WARNING);
$old->clear();

View File

@ -850,12 +850,22 @@ final class MTProto implements TLCallback, LoggerGetter
$this->chats,
$this->full_chats,
);
DbPropertiesFactory::get(
// Todo for when the username db is global
/*DbPropertiesFactory::get(
$this->settings->getDb(),
$this->getDbPrefix().'_MTProto_usernames',
['innerMadelineProto' => true],
$this->usernames
)->clear();
)->clear();*/
}
if (!isset($this->TL)) {
$this->TL = new TL($this);
$callbacks = [$this, $this->referenceDatabase];
if (!($this->authorization['user']['bot'] ?? false)) {
$callbacks[] = $this->minDatabase;
}
$this->TL->init($this->settings->getSchema(), $callbacks);
}
}