|
7 | 7 | use Doctrine\DBAL\Connection;
|
8 | 8 | use Doctrine\DBAL\Platforms\Keywords\KeywordList;
|
9 | 9 | use Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords;
|
10 |
| -use Doctrine\DBAL\Schema\ColumnDiff; |
11 | 10 | use Doctrine\DBAL\Schema\ForeignKeyConstraint;
|
12 | 11 | use Doctrine\DBAL\Schema\Identifier;
|
13 | 12 | use Doctrine\DBAL\Schema\Index;
|
14 | 13 | use Doctrine\DBAL\Schema\PostgreSQLSchemaManager;
|
15 | 14 | use Doctrine\DBAL\Schema\Sequence;
|
16 | 15 | use Doctrine\DBAL\Schema\TableDiff;
|
17 | 16 | use Doctrine\DBAL\TransactionIsolationLevel;
|
18 |
| -use Doctrine\DBAL\Types\BinaryType; |
19 |
| -use Doctrine\DBAL\Types\BlobType; |
20 | 17 | use UnexpectedValueException;
|
21 | 18 |
|
22 |
| -use function array_diff; |
23 | 19 | use function array_merge;
|
24 | 20 | use function array_unique;
|
25 | 21 | use function array_values;
|
26 |
| -use function count; |
27 | 22 | use function explode;
|
28 | 23 | use function implode;
|
29 | 24 | use function in_array;
|
@@ -265,10 +260,6 @@ public function getAlterTableSQL(TableDiff $diff): array
|
265 | 260 | continue;
|
266 | 261 | }
|
267 | 262 |
|
268 |
| - if ($this->isUnchangedBinaryColumn($columnDiff)) { |
269 |
| - continue; |
270 |
| - } |
271 |
| - |
272 | 263 | $fromColumn = $columnDiff->fromColumn;
|
273 | 264 |
|
274 | 265 | $oldColumnName = $fromColumn->getQuotedName($this);
|
@@ -372,32 +363,6 @@ public function getAlterTableSQL(TableDiff $diff): array
|
372 | 363 | return array_merge($sql, $tableSql, $columnSql);
|
373 | 364 | }
|
374 | 365 |
|
375 |
| - /** |
376 |
| - * Checks whether a given column diff is a logically unchanged binary type column. |
377 |
| - * |
378 |
| - * Used to determine whether a column alteration for a binary type column can be skipped. |
379 |
| - * Doctrine's {@see BinaryType} and {@see BlobType} are mapped to the same database column type on this platform |
380 |
| - * as this platform does not have a native VARBINARY/BINARY column type. Therefore the comparator |
381 |
| - * might detect differences for binary type columns which do not have to be propagated |
382 |
| - * to database as there actually is no difference at database level. |
383 |
| - */ |
384 |
| - private function isUnchangedBinaryColumn(ColumnDiff $columnDiff): bool |
385 |
| - { |
386 |
| - $columnType = $columnDiff->column->getType(); |
387 |
| - |
388 |
| - if (! $columnType instanceof BinaryType && ! $columnType instanceof BlobType) { |
389 |
| - return false; |
390 |
| - } |
391 |
| - |
392 |
| - $fromColumnType = $columnDiff->fromColumn->getType(); |
393 |
| - |
394 |
| - if (! $fromColumnType instanceof BinaryType && ! $fromColumnType instanceof BlobType) { |
395 |
| - return false; |
396 |
| - } |
397 |
| - |
398 |
| - return count(array_diff($columnDiff->changedProperties, ['type', 'length', 'fixed'])) === 0; |
399 |
| - } |
400 |
| - |
401 | 366 | /**
|
402 | 367 | * {@inheritdoc}
|
403 | 368 | */
|
|
0 commit comments