Commit f32cf531 authored by Steve Müller's avatar Steve Müller Committed by Benjamin Eberlei

fix driver error while introspecting sequences in SQL Server 2012

parent 4d486d45
......@@ -67,7 +67,14 @@ class SQLServer2012Platform extends SQLServer2008Platform
*/
public function getListSequencesSQL($database)
{
return 'SELECT seq.name, seq.increment, seq.start_value FROM sys.sequences AS seq';
return 'SELECT seq.name,
CAST(
seq.increment AS VARCHAR(MAX)
) AS increment, -- CAST avoids driver error for sql_variant type
CAST(
seq.start_value AS VARCHAR(MAX)
) AS start_value -- CAST avoids driver error for sql_variant type
FROM sys.sequences AS seq';
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment