Skip to content

Conversation

@paulmhh
Copy link

@paulmhh paulmhh commented Dec 4, 2025

mysql requires text type column defaults to be written as expressions
https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html

=> correct mysql8+ syntax is:
DEFAULT ('text literal')

Q A
Type bug/improvement
Fixed issues NA

Summary

mysql8+ does support default values for text typed columns (text, blob, json, geometry)
doctrine disallows this and silently drops the default value

mysql requires text type column defaults to be written as expressions
https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html

DEFAULT ('text literal')
@derrabus
Copy link
Member

derrabus commented Dec 4, 2025

Thank you. Please add tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants