Commit 443af382 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #185 from mvrhov/pgLengthSchemaUpdate

Add schema changes for length for postgres
parents 6126f8ff d0c00d3a
......@@ -407,6 +407,11 @@ class PostgreSqlPlatform extends AbstractPlatform
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) {
......
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