Fix #18110: Add quotes to return value of viewName in MSSQL schema. It is [someView] now

This commit is contained in:
DarkDef
2020-06-22 23:46:04 +03:00
committed by GitHub
parent 24505e7cdd
commit d755004c41
2 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,7 @@ Yii Framework 2 Change Log
- Bug #18101: Fix behavior of OUTPUT INSERTED.* for SQL Server query: "insert default values"; correct MSSQL unit tests; turn off profiling echo message in migration test (darkdef)
- Bug #18105: Fix for old trigger in RBAC migration with/without prefixTable (darkdef)
- Enh #18120: Include path to the log file into error message if `FileTarget::export` fails (uaoleg)
- Bug #18110: Add quotes to return value of viewName in MSSQL schema. It is `[someView]` now (darkdef)
2.0.35 May 02, 2020

View File

@ -595,7 +595,12 @@ WHERE [t].[table_schema] = :schema AND [t].[table_type] = 'VIEW'
ORDER BY [t].[table_name]
SQL;
return $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
$views = $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
$views = array_map(static function ($item) {
return '[' . $item . ']';
}, $views);
return $views;
}
/**