Adding a BinaryField, TextField, JSONField, or GeometryField with a db_default crashes on MySQL
MySQL do not support literal value DEFAULT for these fields and requires them to be wrapped in parenthesis so they are considered expressions.
This is already something we must handle when using DEFAULT to add fields with a default so all the backend specific logic lives in in _column_default_sql so it's only a matter of using it in db_default_sql.
Change History
(4)
| Has patch: |
set
|
| Triage Stage: |
Unreviewed → Accepted
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
In dfc77637: