You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.venv/lib/python3.7/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1067, "Invalid default value for 'weight'")
It is unclear from the docs how to use None
The text was updated successfully, but these errors were encountered:
I do not think that it is necessary to have a AddDefaultValue operation for a default NULL value.
On MySQL, a Python None is a SQL NULL.
Either the weight column is nullable, and the default value will be NULL by convention (when not specifying the value in an INSERT => is null by default, or Django will define it in an INSERT => Django will put a null) => you don't need a AddDefaultValue
Or the column is NOT NULL, in which case the default value cannot be NULL anyway
Hi! Thanks a lot for this library. I am trying to use it like this:
And this happens:
It is unclear from the docs how to use
None
The text was updated successfully, but these errors were encountered: