7 declare(strict_types=1);
31 private $resourceConnection;
36 private $selectGenerator;
49 $this->selectGenerator = $selectGenerator;
68 $newTable = $elementHistory->
getNew();
70 $oldTable = $elementHistory->
getOld();
73 return function () use ($newTable, $oldTable, $that) {
74 $firstConnection = $that->resourceConnection->getConnection($oldTable->getResource());
75 $secondConnection = $that->resourceConnection->getConnection($newTable->getResource());
76 $select = $firstConnection->select()->from($oldTable->getName());
78 foreach ($this->selectGenerator->generator(
$select, $oldTable->getResource()) as
$data) {
81 $secondConnection->insertArray($newTable->getName(),
$columns,
$data);
isApplicable(string $statement)
const SKIP_MIGRATION_DATA_FLAG
__construct(ResourceConnection $resourceConnection, SelectGenerator $selectGenerator)
getCallback(ElementHistory $elementHistory)