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
How can I set default current timestmp in mySQL?
I want to have current timestamp in that field when the record is modilfied
I used below code but got error as below
AddDefaultValue(
model_name='my_model',
name='my_column',
value='NOW'
),
File "C:\Python310\lib\site-packages\MySQLdb\connections.py", line 254, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1067, "Invalid default value for 'my_column'")
Regards,
Oil
The text was updated successfully, but these errors were encountered:
Dear Sir,
How can I set default current timestmp in mySQL?
I want to have current timestamp in that field when the record is modilfied
I used below code but got error as below
AddDefaultValue(
model_name='my_model',
name='my_column',
value='NOW'
),
File "C:\Python310\lib\site-packages\MySQLdb\connections.py", line 254, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1067, "Invalid default value for 'my_column'")
Regards,
Oil
The text was updated successfully, but these errors were encountered: