mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 15:15:38 -05: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:
@@ -992,7 +992,7 @@ def notify_service(notify_db, notify_db_session):
|
||||
'active': True,
|
||||
'restricted': False,
|
||||
'email_from': 'notify.service',
|
||||
'created_by': user
|
||||
'created_by': user,
|
||||
}
|
||||
service = Service(**data)
|
||||
db.session.add(service)
|
||||
|
||||
Reference in New Issue
Block a user