Migrate extensions in upgrade script

This commit is contained in:
Toby Zerner 2015-08-18 13:56:49 +09:30
parent 71c7740086
commit 3392d9fdcf

View File

@ -52,5 +52,19 @@ class UpgradeCommand extends Command
foreach ($migrator->getNotes() as $note) {
$this->info($note);
}
$extensions = $this->container->make('Flarum\Support\ExtensionManager');
$migrator = $extensions->getMigrator();
foreach ($extensions->getInfo() as $extension) {
$this->info('Upgrading extension: '.$extension->name);
$extensions->enable($extension->name);
foreach ($migrator->getNotes() as $note) {
$this->info($note);
}
}
}
}