MySQL strict mode
Created November 16, 2017. Copied from redmine (https://bugs.ligo.org/redmine/issues/5985)
After upgrading to Django 1.11, you get the following warning when doing migrations:
?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default' HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-sql-mode
The link suggests adding one of the following to your DATABASES OPTIONS:
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'" 'init_command': "SET sql_mode='STRICT_ALL_TABLES'"
Both of these can lead to issues with the MyISAM engine (see https://www.noelherrick.com/blog/mysql-strict_all_tables-vs-strict_trans_tables). I think we're going to ignore this warning until we potentially update to InnoDB.