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:
parent
ff6f66e5c5
commit
6854c6c1f9
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user