Merge pull request #1330 from stefan123t/master

fix #1129 empty only existing tables in emptyAll()
pull/1413/head
Carl Schwan 2022-05-09 13:03:00 +02:00 zatwierdzone przez GitHub
commit 293f028a19
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -1164,10 +1164,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();
}
}
}