1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 15:07:53 +02:00

Live output of migrator notes

This commit is contained in:
Toby Zerner
2018-09-21 11:22:51 +09:30
parent 986d811a16
commit 9e487b4e41
3 changed files with 25 additions and 29 deletions

View File

@@ -60,14 +60,12 @@ class MigrateCommand extends AbstractCommand
});
$migrator = $this->container->make('Flarum\Database\Migrator');
$migrator->setOutput($this->output);
$migrator->run(__DIR__.'/../../../migrations');
foreach ($migrator->getNotes() as $note) {
$this->info($note);
}
$extensions = $this->container->make('Flarum\Extension\ExtensionManager');
$extensions->getMigrator()->setOutput($this->output);
foreach ($extensions->getExtensions() as $name => $extension) {
if (! $extension->isEnabled()) {
@@ -76,11 +74,7 @@ class MigrateCommand extends AbstractCommand
$this->info('Migrating extension: '.$name);
$notes = $extensions->migrate($extension);
foreach ($notes as $note) {
$this->info($note);
}
$extensions->migrate($extension);
}
$this->container->make('Flarum\Settings\SettingsRepositoryInterface')->set('version', $this->container->version());