Commit Graph

2 Commits

Author SHA1 Message Date
Leo Hemsted
3486355354 remove any broadcast templates in downgrade step 2020-07-06 17:43:44 +01:00
Leo Hemsted
5f337f7914 add broadcast_message to database
new broadcast_message table. contains a whole bunch of timestamps, a
couple of user ids for who created and who approved, some
personalisation and a template id/version. areas is a jsonb field - it
is expected that this will be an array, for example `["england",
"wales"]`

intended valid state transitions are as follows, from an initial status
of draft

* draft -> pending-approval, rejected
* pending-approval -> broadcasting, rejected, (draft maybe)
* broadcasting -> completed, cancelled

rejected, completed, cancelled and technical-failure are terminating
states.

also copy across the enum switching code from migration 0060 (adding
letter type).
2020-07-06 16:37:35 +01:00