/** @var DumpIterator $dump */
$dump =
$this->
getContainer()->
offsetGet('database.snippet_dump_iterator'
);
$this->
dumpProgress($conn,
$dump);
} private function dumpProgress(PDO
$conn, DumpIterator
$dump) { $totalCount =
$dump->
count();
$progress =
$this->IOHelper->
createProgressBar($totalCount);
$progress->
setRedrawFrequency(20
);
$progress->
start();
foreach ($dump as $sql) { // Execute each query one by one
// https://bugs.php.net/bug.php?id=61613
$conn->
exec($sql);
$progress->
advance();
} $progress->
finish();
$this->IOHelper->
writeln(''
);
}