Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add schema changes for length for postgres

  • Loading branch information...
commit d0c00d3ae8b37e3dc79476d95917518e06f826f6 1 parent 24ec194
@mvrhov mvrhov authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View
5 lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
@@ -407,6 +407,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) {
Please sign in to comment.
Something went wrong with that request. Please try again.