diff --git a/modules/system/classes/UpdateManager.php b/modules/system/classes/UpdateManager.php index 1723f2f282..475f243aec 100644 --- a/modules/system/classes/UpdateManager.php +++ b/modules/system/classes/UpdateManager.php @@ -128,6 +128,18 @@ public function bindContainerObjects() $this->repository = App::make('migration.repository'); } + /** + * Sets the database connection to use for migrations. + * @param string $connection + * @return self + */ + public function setConnection($connection) + { + $this->migrator->setConnection($connection); + + return $this; + } + /** * Creates the migration table and updates * @return self diff --git a/modules/system/console/WinterUp.php b/modules/system/console/WinterUp.php index 1b54d1d534..9892fd5fff 100644 --- a/modules/system/console/WinterUp.php +++ b/modules/system/console/WinterUp.php @@ -20,7 +20,8 @@ class WinterUp extends Command implements Isolatable * @var string */ protected $signature = 'winter:up - {--seed : Included for compatibility with Laravel default signature, no effect at this time}'; + {--seed : Included for compatibility with Laravel default signature, no effect at this time} + {--connection= : The database connection to use}'; /** * The console command description. @@ -47,6 +48,7 @@ public function handle() UpdateManager::instance() ->setNotesOutput($this->output) + ->setConnection($this->option('connection')) ->update(); } }