fix #1129 empty only existing tables in emptyAll()

feature/145/mastodon-api
stefan123t 2021-11-23 07:58:29 +01:00
rodzic e4217a82cf
commit 17666a5f74
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -1201,10 +1201,11 @@ class CoreRequestBuilder {
*/
public function emptyAll() {
foreach ($this->tables as $table) {
$qb = $this->dbConnection->getQueryBuilder();
$qb->delete($table);
$qb->execute();
if ($schema->hasTable($table)) {
$qb = $this->dbConnection->getQueryBuilder();
$qb->delete($table);
$qb->execute();
}
}
}