Skip to content

Commit 62fc436

Browse files
authored
Reintroduce support for multi-db setups (#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 409bbf6 commit 62fc436

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)