db2 driver updates
This commit is contained in:
@@ -258,12 +258,11 @@ class Db2QueryGrammar extends Grammar
|
||||
$expression = "{$function}({$column})";
|
||||
|
||||
// PDO_ODBC may return Db2 integer aggregates as binary data.
|
||||
// Cast only the migration batch aggregate to VARCHAR.
|
||||
// Cast migration batch aggregates, including custom repository tables.
|
||||
if (
|
||||
$function === 'max' &&
|
||||
count($aggregate['columns']) === 1 &&
|
||||
$aggregate['columns'][0] === 'batch' &&
|
||||
$query->from === 'migrations'
|
||||
$aggregate['columns'][0] === 'batch'
|
||||
) {
|
||||
$expression = "CAST(COALESCE({$expression}, 0) AS VARCHAR(20))";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user