Skip to content

Remove emergency alerts data#4201

Merged
leohemsted merged 2 commits into
mainfrom
remove-emergency-alerts-data
Oct 4, 2024
Merged

Remove emergency alerts data#4201
leohemsted merged 2 commits into
mainfrom
remove-emergency-alerts-data

Conversation

@leohemsted

@leohemsted leohemsted commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

prerequisite before we can remove the code and models: #3976

flow:

this is a data migration (so no downgrade) that deletes broadcast
services and all associated data - this includes obvious things like
broadcast events and templates, but also everything connected to those
services like user permissions, inbound senders, ft_billing rows, etc

Although some of these theoretically shouldn't exist for broadcast
services (eg returned_letters), issue the deletes out of an abundance of
caution. These migrations need to pass on preview and staging as well as
production, and for example there was a broadcast service on staging
with an inbound sms number

This has been tested against a copy of the staging database.
@leohemsted leohemsted force-pushed the remove-emergency-alerts-data branch from 0cd47fc to 0245e94 Compare October 1, 2024 14:44
@leohemsted leohemsted mentioned this pull request Oct 1, 2024
7 tasks
@leohemsted

leohemsted commented Oct 2, 2024

Copy link
Copy Markdown
Contributor Author

I checked on prod: there are currently no active broadcast services - all the ones that would be deleted have already been archived

select name
from services
join service_broadcast_settings ON service_broadcast_settings.service_id = services.id
where active
+------+
| name |
|------|
+------+
SELECT 0

Comment thread migrations/versions/0465_delete_broadcast_data.py

@joybytes joybytes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very happy with this!

@leohemsted leohemsted merged commit 9c1875e into main Oct 4, 2024
@leohemsted leohemsted deleted the remove-emergency-alerts-data branch October 4, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants