1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for multi db migration

This commit is contained in:
David Bomba 2021-02-10 14:42:02 +11:00
parent ff6f66e5c5
commit 6854c6c1f9

View File

@ -49,19 +49,26 @@ class DesignUpdate extends Command
*/
public function handle()
{
//always return state to first DB
$current_db = config('database.default');
if (! config('ninja.db.multi_db_enabled')) {
$this->handleOnDb();
} else {
//multiDB environment, need to
foreach (MultiDB::$dbs as $db) {
MultiDB::setDB($db);
$this->handleOnDb($db);
}
MultiDB::setDB($current_db);
}
}
private function handleOnDb()