Skip to content

Commit b8d6da0

Browse files
benpoulsond3v2a
authored andcommitted
Reintroduce support for multi-db setups (barryvdh#1426)
This snipet was lost in the 2.12.x => 2.13.x change. Needs to be reintroduced to allow those who use fully qualified db+table names. (Eg, `database.table`)
1 parent dba1c78 commit b8d6da0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Console/ModelsCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,10 @@ public function getPropertiesFromTable($model)
510510
$schema = $model->getConnection()->getDoctrineSchemaManager();
511511
$databasePlatform = $schema->getDatabasePlatform();
512512
$databasePlatform->registerDoctrineTypeMapping('enum', 'string');
513+
514+
if (strpos($table, '.')) {
515+
[$database, $table] = explode('.', $table);
516+
}
513517

514518
$platformName = $databasePlatform->getName();
515519
$customTypes = $this->laravel['config']->get("ide-helper.custom_db_types.{$platformName}", []);

0 commit comments

Comments
 (0)