USGS-WiM / whispersservices

Django services for WHISPers
2 stars 1 forks source link

Message template ID in Notifications table #550

Closed nbaertlein closed 2 years ago

nbaertlein commented 2 years ago

Would like to add the id from 'whispers_notificationmessagetemplate' to 'whispers_notification' at the time of notification creation. Will help monitor usage and performance trends over time, especially as message subject and body may change. Currently, the only way to track this is to join the two tables by truncated subject and/or body.

aaronstephenson commented 2 years ago

Implemented in e860b4a, will be included soon in next Test branch release. Note that for existing notification records I will have to populate the template ID foreign key with a value to comply with the not null constraint on that column; I chose 19 (Custom Template) in the DB migration script, but you can overwrite those records in the table at your convenience following the DB migration.

JChipault commented 2 years ago

@nbaertlein Can you check this one?