4👍
✅
MySQL
in latest versions has made it mandatory to add default value for NOT NULL
columns. It is caused due to STRICT_TRANS_TABLES
mode. There are 3 ways to fix it,
1) Add default value to not null columns.
ALTER TABLE tablename MODIFY columname DATATYPE NOT NULL DEFAULT 'a value'
2) Set NULL values by default
ALTER TABLE tablename MODIFY columname DATATYPE NULL
3) In MySQL
configuration file, remove STRICT_TRANS_TABLES
from sql_mode
and restart the service.
- [Django]-File does not exist: /var/www/polls
- [Django]-Proper way to add code to logout view in Django
- [Django]-How to get a word count on word document in python?
- [Django]-Is there a default file upload size limit in django?
Source:stackexchange.com