Django IntegrityError: no default value
<p>There is a longer SQL query that I need to run to migrate data from one table to another. It worked fine all the way up to this week when I migrated to Django 1.9.2 and Python 3.5. </p>

<p>The problem is that the table has a field 'last_update' that is NULL by default. The table definition is</p>

<pre><code>last_update = models.DateTimeField("last updated",null=True, auto_now_add=False, auto_now=True)
</code></pre>

<p>I've also checked with MySQL Workbench and the table is indeed set to allow NULLs on that field and the default is NULL.</p>

<p>The query crashes after about 30 minutes with the error message:</p>

<pre><code>django.db.utils.IntegrityError: (1364, "Field 'last_update' doesn't have a default value")
</code></pre>

<p>Very irritating! How can I insert rows to that table?</p>

<p>Per request, here is the table definition:</p>

<pre><code>CREATE TABLE `google_pla_plaproducts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_code` varchar(55) CHARACTER SET utf8 NOT NULL,
  `min_bid` decimal(20,4) NOT NULL,
  `current_bid` decimal(20,4) NOT NULL,
  `max_bid` decimal(20,4) NOT NULL,
  `creation_date` datetime(6),
  `last_update` datetime(6) DEFAULT NULL,
  `status_change` datetime(6) DEFAULT NULL,
  `starting_bid` decimal(20,4) NOT NULL,
  `adgroup_id` int(11) NOT NULL,
  `status_id` int(11) NOT NULL,
  `product_price` decimal(20,4) NOT NULL,
  PRIMARY KEY (`id`,`product_code`,`adgroup_id`),
  KEY `google_p_adgroup_id_3b7c9d4ecddd04ba_fk_google_pla_plaadgroup_id` (`adgroup_id`),
  KEY `google_pla_plaprod_status_id_2f8113a5ef0dd021_fk_globs_status_id` (`status_id`),
  KEY `idx_prod_code` (`product_code`),
  CONSTRAINT `google_p_adgroup_id_3b7c9d4ecddd04ba_fk_google_pla_plaadgroup_id` FOREIGN KEY (`adgroup_id`) REFERENCES `google_pla_plaadgroup` (`id`),
  CONSTRAINT `google_pla_plaprod_status_id_2f8113a5ef0dd021_fk_globs_status_id` FOREIGN KEY (`status_id`) REFERENCES `globs_status` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=88949 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
</code></pre>