mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
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`)
This commit is contained in:
@@ -511,6 +511,10 @@ class ModelsCommand extends Command
|
|||||||
$databasePlatform = $schema->getDatabasePlatform();
|
$databasePlatform = $schema->getDatabasePlatform();
|
||||||
$databasePlatform->registerDoctrineTypeMapping('enum', 'string');
|
$databasePlatform->registerDoctrineTypeMapping('enum', 'string');
|
||||||
|
|
||||||
|
if (strpos($table, '.')) {
|
||||||
|
[$database, $table] = explode('.', $table);
|
||||||
|
}
|
||||||
|
|
||||||
$platformName = $databasePlatform->getName();
|
$platformName = $databasePlatform->getName();
|
||||||
$customTypes = $this->laravel['config']->get("ide-helper.custom_db_types.{$platformName}", []);
|
$customTypes = $this->laravel['config']->get("ide-helper.custom_db_types.{$platformName}", []);
|
||||||
foreach ($customTypes as $yourTypeName => $doctrineTypeName) {
|
foreach ($customTypes as $yourTypeName => $doctrineTypeName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user