mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
update schema to use template_history for accurate template details
only in the public notification endpoint so far for fear of breaking things - in an ideal world i'd remove the template relationship from models entirely and replace that with actual_template
This commit is contained in:
@@ -448,9 +448,6 @@ class Notification(db.Model):
|
||||
reference = db.Column(db.String, nullable=True, index=True)
|
||||
_personalisation = db.Column(db.String, nullable=True)
|
||||
|
||||
# __table_args__ = (
|
||||
# ForeignKeyConstraint(['template_id', 'template_version'], ['template_history.id', 'template_history.version']),
|
||||
# )
|
||||
actual_template = db.relationship('TemplateHistory', primaryjoin=and_(
|
||||
foreign(template_id) == remote(TemplateHistory.id),
|
||||
foreign(template_version) == remote(TemplateHistory.version)
|
||||
|
||||
Reference in New Issue
Block a user