Closes #17057. \yii\db\mssql\Schema::findTableNames should return quoted table names. (#17409)

This commit is contained in:
Alexander Kartavenko
2019-07-02 17:03:27 +03:00
committed by Alexander Makarov
parent 31eadebe43
commit 6b10bbcec2

View File

@ -177,8 +177,12 @@ FROM [INFORMATION_SCHEMA].[TABLES] AS [t]
WHERE [t].[table_schema] = :schema AND [t].[table_type] IN ('BASE TABLE', 'VIEW')
ORDER BY [t].[table_name]
SQL;
$tables = $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
$tables = array_map(static function ($item) {
return '[' . $item . ']';
}, $tables);
return $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
return $tables;
}
/**