Doctrine\DBAL\Platforms\PostgreSqlPlatform::isUnchangedBinaryColumn PHP Метод

isUnchangedBinaryColumn() приватный Метод

Used to determine whether a column alteration for a binary type column can be skipped. Doctrine's {@link \Doctrine\DBAL\Types\BinaryType} and {@link \Doctrine\DBAL\Types\BlobType} are mapped to the same database column type on this platform as this platform does not have a native VARBINARY/BINARY column type. Therefore the {@link \Doctrine\DBAL\Schema\Comparator} might detect differences for binary type columns which do not have to be propagated to database as there actually is no difference at database level.
private isUnchangedBinaryColumn ( Doctrine\DBAL\Schema\ColumnDiff $columnDiff ) : boolean
$columnDiff Doctrine\DBAL\Schema\ColumnDiff The column diff to check against.
Результат boolean True if the given column diff is an unchanged binary type column, false otherwise.
    private function isUnchangedBinaryColumn(ColumnDiff $columnDiff)
    {
        $columnType = $columnDiff->column->getType();
        if (!$columnType instanceof BinaryType && !$columnType instanceof BlobType) {
            return false;
        }
        $fromColumn = $columnDiff->fromColumn instanceof Column ? $columnDiff->fromColumn : null;
        if ($fromColumn) {
            $fromColumnType = $fromColumn->getType();
            if (!$fromColumnType instanceof BinaryType && !$fromColumnType instanceof BlobType) {
                return false;
            }
            return count(array_diff($columnDiff->changedProperties, array('type', 'length', 'fixed'))) === 0;
        }
        if ($columnDiff->hasChanged('type')) {
            return false;
        }
        return count(array_diff($columnDiff->changedProperties, array('length', 'fixed'))) === 0;
    }
PostgreSqlPlatform