add broadcast_event table

It's clear that we need a way to track updates to a broadcast message.
It's also clear that we'll need some kind of audit log that captures
exactly what was sent out in a message.

This commit adds a new database table, `broadcast_event`, which maps 1:1
with CAP XML sent to the CBCs. We'll create one of these just before
sending out.

The main driver for this was that cancel and update messages need to
contain a list of references of all previous messages that they're
amending. This is of format `{sender},{identifier},{sent_timestamp}`,
and the identifier itself needs to be unique for each message.
This commit is contained in:
Leo Hemsted
2020-07-24 12:46:28 +01:00
parent 5dc8b43242
commit 36ae5fadf6
4 changed files with 136 additions and 1 deletions

View File

@@ -117,6 +117,7 @@ def notify_db_session(notify_db, sms_providers):
"organisation_types",
"service_permission_types",
"auth_type",
"broadcast_status_type",
"invite_status_type",
"service_callback_type"]:
notify_db.engine.execute(tbl.delete())