diff --git a/lib/Config/Migrator.php b/lib/Config/Migrator.php index e3fc5d87f1..bf1ec536f7 100644 --- a/lib/Config/Migrator.php +++ b/lib/Config/Migrator.php @@ -200,7 +200,7 @@ class Migrator { 'id int(11) unsigned NOT NULL AUTO_INCREMENT,', 'subscriber_id int(11) unsigned NOT NULL,', 'custom_field_id int(11) unsigned NOT NULL,', - 'value text,', + 'value text NOT NULL,', 'created_at TIMESTAMP NULL,', 'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,', 'PRIMARY KEY (id),', diff --git a/tests/unit/Models/SubscriberTest.php b/tests/unit/Models/SubscriberTest.php index 1c9e0059bc..c4cc6b5841 100644 --- a/tests/unit/Models/SubscriberTest.php +++ b/tests/unit/Models/SubscriberTest.php @@ -827,6 +827,7 @@ class SubscriberTest extends \MailPoetTest { $subscriber_custom_field->subscriber_id = ($custom_field !== 5) ? $subscriber->id : 100; // create one record with a nonexistent subscriber id + $subscriber_custom_field->value = 'somevalue'; $subscriber_custom_field->save(); } expect(SubscriberCustomField::findMany())->count(5); @@ -1170,4 +1171,4 @@ class SubscriberTest extends \MailPoetTest { \ORM::raw_execute('TRUNCATE ' . SendingQueue::$_table); \ORM::raw_execute('TRUNCATE ' . Setting::$_table); } -} \ No newline at end of file +}