Create new column in notifications and notification_history to store the client_reference because I remembered that reference is used for email providers.

This commit is contained in:
Rebecca Law
2016-11-17 13:42:34 +00:00
parent dc5e21a78e
commit bc434f1736
6 changed files with 38 additions and 10 deletions

View File

@@ -519,6 +519,7 @@ class Notification(db.Model):
onupdate=datetime.datetime.utcnow)
status = db.Column(NOTIFICATION_STATUS_TYPES_ENUM, index=True, nullable=False, default='created')
reference = db.Column(db.String, nullable=True, index=True)
client_reference = db.Column(db.String, index=True, nullable=True)
_personalisation = db.Column(db.String, nullable=True)
template_history = db.relationship('TemplateHistory', primaryjoin=and_(
@@ -561,6 +562,7 @@ class NotificationHistory(db.Model):
updated_at = db.Column(db.DateTime, index=False, unique=False, nullable=True)
status = db.Column(NOTIFICATION_STATUS_TYPES_ENUM, index=True, nullable=False, default='created')
reference = db.Column(db.String, nullable=True, index=True)
client_reference = db.Column(db.String, nullable=True)
@classmethod
def from_notification(cls, notification):