mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-05 14:28:25 -04:00
add nullable document_count field to Notifications
intention is for this to be null, 1, or many, based on how many documents were linked to within the message. nullable column, so that it doesn't require a lengthy access exclusive lock on the table when creating.
This commit is contained in:
@@ -1407,6 +1407,8 @@ class Notification(db.Model):
|
||||
|
||||
reply_to_text = db.Column(db.String, nullable=True)
|
||||
|
||||
document_download_count = db.Column(db.Integer, nullable=True)
|
||||
|
||||
postage = db.Column(db.String, nullable=True)
|
||||
CheckConstraint("""
|
||||
CASE WHEN notification_type = 'letter' THEN
|
||||
@@ -1683,6 +1685,8 @@ class NotificationHistory(db.Model, HistoryModel):
|
||||
END
|
||||
""")
|
||||
|
||||
document_download_count = db.Column(db.Integer, nullable=True)
|
||||
|
||||
__table_args__ = (
|
||||
db.ForeignKeyConstraint(
|
||||
['template_id', 'template_version'],
|
||||
|
||||
Reference in New Issue
Block a user