How to add column descriptions (comments) in Doctrine2

Viewed 22551

I would like to add a column description (also called a "comment") to a column defined by a Doctrine2 entity but can't find any information on how to do it using the @Column annotation without possibly breaking Doctrine's SchemaTool.

If I use the columnDefinition attribute of the @Column annotation like

@Column(type="string" columnDefinition="COMMENT 'This is a column comment'")

the annotations reference states

SchemaTool will not detect changes on the column correctly anymore if you use “columnDefinition”.

So is there a way to define a column description without breaking the SchemaTool?

The only clue I got was this pull request which ended in "This was solved in different ways.".

1 Answers
Related