I have generated entities from a (MySQL) database, then created a new (zf2) project with a blank database by running the following statements:
vendor/bin/doctrine-module orm:schema-tool:create
vendor/bin/doctrine-module orm:schema-tool:update --force
vendor/bin/doctrine-module orm:validate-schema
Unfortunately the update statement keeps updating the same statement:
ALTER TABLE rollen CHANGE name name VARCHAR(30) NOT NULL;
and the validation fails. The DB shows the correct column. The Doctrine\DBAL\Schema\Comparator shows a different precision (not yet quite sure what that is supposed to be) of the corresponding column.
Looking at the corresponding diffColumn function in Doctrine\DBAL\Schema\Comparator, showed me that auto-increment set in the meta-data schema (see following annotation):
@ORM\GeneratedValue(strategy="IDENTITY")
the precision part seems to be part of this strategy (although I still don't understand this, since a auto-increment id is rather an in than decimal, see http://doctrine-orm.readthedocs.org/en/latest/reference/annotations-reference.html#column)