1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 13:10:24 +02:00

Only migrate enabled extensions when upgrading

Also remove the Extension::install() and Extension::uninstall()
methods, because they add nothing that can't be done with migrations.
This commit is contained in:
Toby Zerner
2015-08-31 14:35:52 +09:30
parent 5e22458014
commit 6c169499b5
3 changed files with 12 additions and 17 deletions

View File

@@ -68,9 +68,13 @@ class UpgradeCommand extends Command
$migrator = $extensions->getMigrator();
foreach ($extensions->getInfo() as $extension) {
if (! $extensions->isEnabled($extension->name)) {
continue;
}
$this->info('Upgrading extension: '.$extension->name);
$extensions->enable($extension->name);
$extensions->migrate($extension->name);
foreach ($migrator->getNotes() as $note) {
$this->info($note);