Added a unique constraint to the notification_id column of the notification_to_email_reply_to table so that each notification can only have one mapping to service_email_reply_to and hence one email address.

This commit is contained in:
Richard Chapman
2017-10-03 11:03:31 +01:00
parent fdc4d4c24f
commit d8e1a34610
2 changed files with 5 additions and 6 deletions

View File

@@ -1422,7 +1422,7 @@ class NotificationEmailReplyTo(db.Model):
notification_id = db.Column(
UUID(as_uuid=True),
db.ForeignKey('notifications.id'),
unique=False,
unique=True,
index=True,
nullable=False,
primary_key=True