Skip to content

Commit

Permalink
Merge branch 'DBAL-323' into 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Oct 6, 2012
2 parents da4b7b4 + 8b2893a commit 912c2de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
Expand Up @@ -445,6 +445,11 @@ public function getAlterTableSQL(TableDiff $diff)
if ($columnDiff->hasChanged('comment') && $comment = $this->getColumnComment($column)) {
$commentsSQL[] = $this->getCommentOnColumnSQL($diff->name, $column->getName(), $comment);
}

if ($columnDiff->hasChanged('length')) {
$query = 'ALTER ' . $column->getName() . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
$sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
}
}

foreach ($diff->renamedColumns as $oldColumnName => $column) {
Expand Down

0 comments on commit 912c2de

Please sign in to comment.