Skip to content

Commit

Permalink
Check column length for text type column
Browse files Browse the repository at this point in the history
For this issue, doctrine#2566
  • Loading branch information
jewei committed Oct 11, 2017
1 parent 9d70667 commit 9151d71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Schema/Comparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ public function diffColumn(Column $column1, Column $column2)
$changedProperties[] = 'default';
}

if (($properties1['type'] instanceof Types\StringType && ! $properties1['type'] instanceof Types\GuidType) ||
$properties1['type'] instanceof Types\BinaryType
if (($properties1['type'] instanceof Types\StringType || $properties1['type'] instanceof Types\TextType &&
! $properties1['type'] instanceof Types\GuidType) || $properties1['type'] instanceof Types\BinaryType
) {
// check if value of length is set at all, default value assumed otherwise.
$length1 = $properties1['length'] ?: 255;
Expand Down

0 comments on commit 9151d71

Please sign in to comment.