Commit e6f96674 authored by Steve Müller's avatar Steve Müller

fix autoincrement column introspection in DB2

parent 3dae2a5c
......@@ -273,7 +273,11 @@ class DB2Platform extends AbstractPlatform
{
return "SELECT DISTINCT c.tabschema, c.tabname, c.colname, c.colno,
c.typename, c.default, c.nulls, c.length, c.scale,
c.identity, tc.type AS tabconsttype, k.colseq
c.identity, tc.type AS tabconsttype, k.colseq,
CASE
WHEN c.generated = 'D' THEN 1
ELSE 0
END AS autoincrement
FROM syscat.columns c
LEFT JOIN (syscat.keycoluse k JOIN syscat.tabconst tc
ON (k.tabschema = tc.tabschema
......
......@@ -93,6 +93,7 @@ class DB2SchemaManager extends AbstractSchemaManager
'unsigned' => (bool)$unsigned,
'fixed' => (bool)$fixed,
'default' => $default,
'autoincrement' => (boolean) $tableColumn['autoincrement'],
'notnull' => (bool) ($tableColumn['nulls'] == 'N'),
'scale' => null,
'precision' => null,
......
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