Commit f8c1d77e authored by Vincent Petry's avatar Vincent Petry

Fix escaping of column name for specific alter table case

When changing the length of a field, the column name needs to be escaped
properly.
parent 5eb36c7a
......@@ -510,7 +510,7 @@ class PostgreSqlPlatform extends AbstractPlatform
}
if ($columnDiff->hasChanged('length')) {
$query = 'ALTER ' . $column->getName() . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
$query = 'ALTER ' . $oldColumnName . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
$sql[] = 'ALTER TABLE ' . $diff->getName()->getQuotedName($this) . ' ' . $query;
}
}
......
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