It turned out that Doctrine [uses string type](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html) internally for most of the drivers (except Postgres) As written [here](https://www.stitcher.io/blog/optimised-uuids-in-mysql) it is much better to store UUIDs as binary data. I propose changing id column to be binary and adding a new with a string representation (for a human).