Allow for proper database resolve with schemas (#1349)

* Allow for proper database resolve with schemas

* Remove need to explode database and table name
This commit is contained in:
Corey McCormick
2022-08-11 12:35:46 +02:00
committed by GitHub
parent c40fee2a3f
commit c76fbb5b61
+1 -5
View File
@@ -463,6 +463,7 @@ class ModelsCommand extends Command
*/
public function getPropertiesFromTable($model)
{
$database = $model->getConnection()->getName();
$table = $model->getConnection()->getTablePrefix() . $model->getTable();
$schema = $model->getConnection()->getDoctrineSchemaManager();
$databasePlatform = $schema->getDatabasePlatform();
@@ -482,11 +483,6 @@ class ModelsCommand extends Command
$databasePlatform->registerDoctrineTypeMapping($yourTypeName, $doctrineTypeName);
}
$database = null;
if (strpos($table, '.')) {
[$database, $table] = explode('.', $table);
}
$columns = $schema->listTableColumns($table, $database);
if (!$columns) {