From 75c4c51a2da16775f1b9f8bf016a2266cec3ef09 Mon Sep 17 00:00:00 2001 From: Tera <1527149+Denoder@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:16:31 +0300 Subject: [PATCH 1/2] Add connection option to migrate --- modules/system/classes/UpdateManager.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 From 3fad5eded532fbafd88a4e1611019dbe1a91f01a Mon Sep 17 00:00:00 2001 From: Tera <1527149+Denoder@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:20:11 +0300 Subject: [PATCH 2/2] Option to set connection for database migration --- modules/system/console/WinterUp.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); } }