1
0
Fork 0
mirror of synced 2024-06-02 02:44:47 +12:00

fix: migration for 0.8.x

This commit is contained in:
Torsten Dittmann 2021-04-15 09:56:45 +02:00
parent e3e28719be
commit d5694815f3
2 changed files with 2 additions and 3 deletions

View file

@ -36,7 +36,7 @@ $cli
$projects = [$console];
$count = 0;
$migration = new Version\V06($register->get('db')); //TODO: remove hardcoded version and move to dynamic migration
$migration = new Version\V07($register->get('db')); //TODO: remove hardcoded version and move to dynamic migration
while ($sum > 0) {
foreach ($projects as $project) {

View file

@ -75,11 +75,10 @@ abstract class Migration
]);
$sum = \count($all);
Runtime::setHookFlags(SWOOLE_HOOK_ALL);
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
Console::log('Migrating: ' . $offset . ' / ' . $this->projectDB->getSum());
\Co\run(function () use ($all, $callback) {
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
foreach ($all as $document) {
go(function () use ($document, $callback) {