Files
notifications-api/app
Katie Smith 7fd52017d0 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-05-19 16:04:36 +01:00
..
2020-05-06 14:11:50 +01:00
2020-03-16 16:45:34 +00:00
2019-12-13 10:02:39 +00:00
2020-05-13 08:56:54 +01:00
2020-04-20 18:39:45 +01:00
2020-02-14 14:15:41 +00:00
2020-01-24 13:18:37 +00:00
2020-04-15 16:40:42 +01:00