Files
notifications-api/app
Katie Smith 186670e10e Update postage db constraints for international letters
The `notifications`, `notification_history`, `templates` and `templates_history`
tables all had a check constraint on the postage column which specified
that the postage had to be `first` or `second` if the notification or
template was a letter. We now have two more options for postage -
`europe` and `rest-of-world`.

It's not possible to alter a check constraint, so the constraints have
to be dropped then recreated. We are not recreating the constraint on
the `notification_history` table since values here are always copied
from the `notifications` table.

The constraints get added as `NOT VALID` at first - this stage will lock
the tables, so updating the `notification` table and `templates` and
`templates_history` are done in separate migrations so that we don't lock
all tables at the same time. In a third migration we then run
`VALIDATE CONSTRAINT` for all tables - this will lock a row at a time,
not the whole table.
2020-04-07 08:01:11 +01:00
..
2020-03-16 16:45:34 +00:00
2020-03-27 15:48:54 +00:00
2019-12-13 10:02:39 +00:00
2020-02-24 11:26:16 +00:00
2020-02-18 14:59:46 +00:00
2020-01-24 13:18:37 +00:00
2020-04-06 15:16:00 +01:00
2020-02-14 14:15:41 +00:00
2020-01-24 13:18:37 +00:00
2020-03-16 16:45:34 +00:00
2019-12-03 14:19:14 +00:00