Commit 18b3db30 authored by Steve Müller's avatar Steve Müller

replace deprecated default value retrieval on PostgreSQL

parent ba61dd3d
...@@ -379,7 +379,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -379,7 +379,7 @@ class PostgreSqlPlatform extends AbstractPlatform
AND pg_index.indkey[0] = a.attnum AND pg_index.indkey[0] = a.attnum
AND pg_index.indisprimary = 't' AND pg_index.indisprimary = 't'
) AS pri, ) AS pri,
(SELECT pg_attrdef.adsrc (SELECT pg_get_expr(adbin, adrelid)
FROM pg_attrdef FROM pg_attrdef
WHERE c.oid = pg_attrdef.adrelid WHERE c.oid = pg_attrdef.adrelid
AND pg_attrdef.adnum=a.attnum AND pg_attrdef.adnum=a.attnum
...@@ -485,7 +485,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -485,7 +485,7 @@ class PostgreSqlPlatform extends AbstractPlatform
$sql[] = 'ALTER TABLE ' . $diff->getName()->getQuotedName($this) . ' ' . $query; $sql[] = 'ALTER TABLE ' . $diff->getName()->getQuotedName($this) . ' ' . $query;
} }
if ($columnDiff->hasChanged('default')) { if ($columnDiff->hasChanged('default') || $columnDiff->hasChanged('type')) {
$defaultClause = null === $column->getDefault() $defaultClause = null === $column->getDefault()
? ' DROP DEFAULT' ? ' DROP DEFAULT'
: ' SET' . $this->getDefaultValueDeclarationSQL($column->toArray()); : ' SET' . $this->getDefaultValueDeclarationSQL($column->toArray());
......
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