1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 18:51:40 +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 5f9f42dc4b
commit 9024cabcb3
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);