Index: branches/5.1.x/core/install/upgrades.sql
===================================================================
diff -u -N -r13816 -r13824
--- branches/5.1.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 13816)
+++ branches/5.1.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 13824)
@@ -1929,3 +1929,11 @@
 UPDATE Events
 SET MessageType = 'text'
 WHERE Event = 'FORM.SUBMISSION.REPLY.TO.USER';
+
+ALTER TABLE Forms
+	ADD ProcessUnmatchedEmails TINYINT NOT NULL DEFAULT '0' AFTER EnableEmailCommunication,
+	ADD INDEX (ProcessUnmatchedEmails);
+
+ALTER TABLE FormSubmissions
+	ADD MessageId VARCHAR(255) NULL DEFAULT NULL AFTER Notes,
+	ADD INDEX (MessageId);
