fix: migration for 0.8.x
This commit is contained in:
parent
e3e28719be
commit
d5694815f3
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue