mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-04 16:20:06 -04:00
Make SMS prefix setting non-nullable
We have now: - defaulted new services to start with this column set to `true` - migrated all preexisting services[1] to have either `true` or `false` set for this column There is no way for a service to switch back from `true`/`false` to `null`. This means that we can safely enforce a non-nullable constraint on this column now. 1. There is a little gotcha: the GOV.UK Notify service still relies on the `sms_sender` column. It doesn’t have a row in the `service_sms_senders` table. This means the previous migration never changed this service’s value for `prefix_sms` from `null`. So this commit also changes its value to `False`, so that the rest of the migration, of the whole column, is possible.
This commit is contained in:
@@ -68,7 +68,7 @@ def create_service(
|
||||
research_mode=False,
|
||||
active=True,
|
||||
email_from=None,
|
||||
prefix_sms=None,
|
||||
prefix_sms=True,
|
||||
):
|
||||
service = Service(
|
||||
name=service_name,
|
||||
|
||||
Reference in New Issue
Block a user