Fix unit tests failing in MySQL strict mode [MAILPOET-1585]

This commit is contained in:
wxa
2018-10-11 23:09:37 +03:00
parent b597cb39f1
commit cb3952c9fb
2 changed files with 2 additions and 1 deletions

View File

@@ -131,7 +131,7 @@ class Migrator {
'task_id int(11) unsigned NOT NULL,',
'subscriber_id int(11) unsigned NOT NULL,',
'processed int(1) NOT NULL,',
'failed int(1) NOT NULL,',
'failed int(1) NOT NULL DEFAULT 0,',
'error text NULL,',
'created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,',
'PRIMARY KEY (task_id, subscriber_id),',

View File

@@ -112,6 +112,7 @@ class CustomFieldTest extends \MailPoetTest {
$association = SubscriberCustomField::create();
$association->subscriber_id = $subscriber->id;
$association->custom_field_id = $this->custom_field->id;
$association->value = '';
$association->save();
}
$custom_field = CustomField::findOne($this->custom_field->id);