We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f4b56e commit 2158a39Copy full SHA for 2158a39
src/Console/ModelsCommand.php
@@ -463,6 +463,7 @@ protected function getTypeOverride($type)
463
*/
464
public function getPropertiesFromTable($model)
465
{
466
+ $database = $model->getConnection()->getName();
467
$table = $model->getConnection()->getTablePrefix() . $model->getTable();
468
$schema = $model->getConnection()->getDoctrineSchemaManager();
469
$databasePlatform = $schema->getDatabasePlatform();
@@ -482,11 +483,6 @@ public function getPropertiesFromTable($model)
482
483
$databasePlatform->registerDoctrineTypeMapping($yourTypeName, $doctrineTypeName);
484
}
485
- $database = null;
486
- if (strpos($table, '.')) {
487
- [$database, $table] = explode('.', $table);
488
- }
489
-
490
$columns = $schema->listTableColumns($table, $database);
491
492
if (!$columns) {
0 commit comments