Issue #2051751 from drupal.org: message.mid is part of the primary key but is not specified to be 'not null'.