schema update does not change text type if length attribute is altered (MySQL) #5121

Open
opened 2026-01-22 14:58:56 +01:00 by admin · 0 comments
Owner

Originally created by @Triodes on GitHub (May 10, 2016).

consider the following annotation
\Column(type="text", length=200, nullable=true)
A column will be created with type tinytext

Now when I remove the length attribute I would expect the type to change to largetext (or text/mediumtext if the length is increased to fit those instead of omitted) when running schema:update. This does not happen however.

Changing it manually is not a big deal, but it is easy to forget when deploying.

P.S. the length attribute docs state that it is only applicable with the string type. But that is obviously not the case.

Originally created by @Triodes on GitHub (May 10, 2016). consider the following annotation `\Column(type="text", length=200, nullable=true)` A column will be created with type tinytext Now when I remove the length attribute I would expect the type to change to largetext (or text/mediumtext if the length is increased to fit those instead of omitted) when running schema:update. This does not happen however. Changing it manually is not a big deal, but it is easy to forget when deploying. P.S. the length attribute docs state that it is only applicable with the string type. But that is obviously not the case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5121